SuccessfulKoala55 Thanks. Last one. How do use this task_urls ?
` from clearml.backend_api.session.client import APIClient
Create an instance of APIClient
client = APIClient()
users = client.users.get_all() `
I get
Traceback (most recent call last): File "get_all_users.py", line 13, in <module> users = client.users.get_all() AttributeError: 'APIClient' object has no attribute 'users'
Although,user = Task._get_default_session().send_request("users", "get_all", json={"id": [user_id]})
did the work.
Thanks SuccessfulKoala55
Also, https://clear.ml/docs/latest/docs/references/api/tasks#post-tasksget_all gives me userID
<tasks.Task: {
"id": "xxx",
"name": "Interactive Session",
"user": "6cfef1d32",
"company": "xxxx",
"type": "application",
"status": "in_progress",
.....
}
I can't find api endpoint to get user name from user_id like "user": "6cfef1d32" above.
CostlyOstrich36 May I know what are the request params to get task urls, tasks.task_urls()
Oh, that's probably my bad 😞 - not all API endpoints are currently available with the APIClient. For now, you can use a direct "low level" call using the session, like:resp = client.session.send_request("users", "get_all") print(resp.json()["data"]["users"])
I am missing something in this. Also, I want to use
https://clear.ml/docs/latest/docs/references/api/definitions#taskstask_urls
tasks.task_urls()
It doesn't mention request parameters in this.
` from clearml.backend_api.session.client import APIClient
from clearml import Task
Create an instance of APIClient
client = APIClient()
tasks = client.tasks.task_urls()
print (tasks)
Traceback (most recent call last):
File "get_all_users.py", line 15, in <module>
tasks = client.tasks.task_urls()
AttributeError: 'Tasks' object has no attribute 'task_urls' `
https://clear.ml/docs/latest/docs/references/api/definitions#taskstask_urls
tasks.task_urls()
It doesn't mention request parameters in this.
` from clearml.backend_api.session.client import APIClient
from clearml import Task
Create an instance of APIClient
client = APIClient()
tasks = client.tasks.task_urls()
print (tasks) Traceback (most recent call last):
File "get_all_users.py", line 15, in <module>
tasks = client.tasks.task_urls()
AttributeError: 'Tasks' object has no attribute 'task_urls' `