Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Hi, How Can I Get Commit Id For Task Using Apiclient?

hi, how can I get commit id for task using APIClient?

  
  
Posted one year ago
Votes Newest

Answers 9


EnviousPanda91 , you can use tasks.get_by_id . I think the commit ID should be there in the data section

  
  
Posted one year ago

CostlyOstrich36 no, there is only task_id and name in response

  
  
Posted one year ago

Please try the following:
` In [1]: from clearml.backend_api.session.client import APIClient

In [2]: client = APIClient()

In [3]: tasks = client.tasks.get_all()

In [4]: tasks[0]
Out[4]: <Task: id=0a27ca578723479a9d146358f6ad3abe, name="2D plots reporting">

In [5]: tasks[0].data
Out[5]:
<tasks.Task: {
"id": "0a27ca578723479a9d146358f6ad3abe",
"name": "2D plots reporting",
"user": "JohnC",
"company": "",
"type": "training",
"status": "published",
"comment": "Auto generated",
"created": "2020-08-17 16:02:22.164000+00:00",
"started": "2020-08-17 16:02:22.261000+00:00",
"completed": "2020-08-17 16:02:23.065000+00:00",
"project": "531785e122644ca5b85b2e19b0321def",
"output": {},
"execution": {
"parameters": {},
"model_desc": {},
"model_labels": {},
"artifacts": []
},
"container": {},
"models": {
"input": [],
"output": []
},
"script": {
"binary": "python3.6",
"repository": " ",
"branch": "master",
"version_num": "8112b6b44fa68a84ac5bb3b515b61a585f65a97f",
"entry_point": "scatter_hist_confusion_mat_reporting.py",
"working_dir": "examples/reporting",
"requirements": {
"pip": "# Python 3.6.11 (default, Jun 29 2020, 04:25:06) [GCC 9.3.0]\n\nnumpy == 1.19.1\ntrains == 0.16.0\n\n# Detailed import analysis\n# **************************\n\n# IMPORT PACKAGE numpy\n# scatter_hist_confusion_mat_reporting.py: 3\n\n# IMPORT PACKAGE trains\n# scatter_hist_confusion_mat_reporting.py: 5\n",
"conda": ""
},
"diff": ""
},
"tags": [],
"system_tags": [
"development"
],
"status_changed": "2020-08-18 07:00:47.924000+00:00",
"status_message": "",
"status_reason": "",
"published": "2020-08-18 07:00:47.924000+00:00",
"last_update": "2020-11-26 08:51:57.997000+00:00",
"last_iteration": 0,
"last_metrics": {},
"hyperparams": {},
"configuration": {},
"runtime": {}
}> `

  
  
Posted one year ago

sure
print(APIClient().tasks.get_all(["95db561a08304a1faac3aabcb117412e"]))
{‘id’: ‘95db561a08304a1faac3aabcb117412e’, ‘name’: ‘task’}

  
  
Posted one year ago

the same result

  
  
Posted one year ago

Can you please add here what you're sending + what is received?

  
  
Posted one year ago

can’t find the desired method, I thought that tasks.get_configurations is exactly what I need, but it is not

  
  
Posted one year ago

What about tasks.get_all and you specify the ID of the task you want as well:
https://clear.ml/docs/latest/docs/references/api/tasks#post-tasksget_all

  
  
Posted one year ago

CostlyOstrich36 thank you! appreciate the quick response!

  
  
Posted one year ago