
Reputation
Badges 1
49 × Eureka!CostlyOstrich36 May I know what are the request params to get task urls, tasks.task_urls()
Thanks for the discussion 🙂
It helped me too.
Yeah exactly. Scalar tab have those but I need to add track in the alert if GPU utilization/gpu memory not in use and experiment in progress then alert. Can I get gpu usage over time frame via API also?
Worked with Bullseye image. Thanks for the suggestion.
I see. It's showing since experiment started.
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....
` 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.
SuccessfulKoala55 Thanks. Last one. How do use this task_urls ?
My goal is to detect events when task does not uses allocated resources (e.g. GPU) for some period of time.
I am still trying to understand clearml api response.
Do you have any clue how can I get it from client.tasks.get_all(status=["in_progress"]) ?
If task has GPU allocated but not using it, would it be in in_progress status also? I want to collect those task.
I see task runtime info. I guess it's current utilization not allocation but not sure.
"runtime": {
"progress": "0",...
SuccessfulKoala55 Yeah, that's possible but then I don't get any firewall will block only one endpoint response. I tried both workers.get_all() and get_stats(), both worked.
Can you share the snippet you used for tasks.get_all() ?
` from clearml.backend_api.session.client import APIClient
from time import time
Create an instance of APIClient
client = APIClient()
tasks = client.tasks.get_all() `This is what I used.
Doc mentions required request Body parameter type. Do I need to add this...
same error for tasks.get_all() endpoint
I see. Dev tools is useful here for finding api endpoints used for the data and
https://github.com/allegroai/clearml/blob/master/clearml/task.py#L987 what I was looking for.
Thanks
` # which python
/Users/anuj.tyagi/clearml_api/venv/bin/python
(venv) LMWPRW6F3:clearml_api root# pip freeze | grep clearml
clearml==1.7.2
Traceback (most recent call last):
File "get_all_task.py", line 8, in <module>
print (client.tasks.get_all())
File "/Users/anuj.tyagi/clearml_api/venv/lib/python3.8/site-packages/clearml/backend_api/session/client/client.py", line 422, in get
result=self.session.send(request_cls(*args, **kwargs)),
File "/Users/anuj.tyagi/clearml_api/venv/lib...
I found system_tags and all the metrics including CPU but can't find any field mentions GPU scalar reported or GPU utilization.
How do I know what are possible options for status? Same for other parameters.
I don't see those in documentation.
https://clear.ml/docs/latest/docs/references/api/tasks#post-tasksget_all
Exactly. I am trying to create alert for tasks that have GPU/CPU allocated but not utilizing it from x period of time.
So, if task is there, GPU will be allocated to it. I will need to check if task is using it or just idle.
AgitatedDove14 I found it's the issue with pycryptodome 😕
Error started coming from here. Maybe specific version of it. Digging more.
` #13 101.0 note: This error originates from a subprocess, and is likely not a problem with pip.
#13 101.0 ERROR: Failed building wheel for pycryptodome
#13 101.0 Running setup.py clean for pycryptodome
#13 104.9 Building wheel for numpy (pyproject.toml): started
#13 158.5 Building wheel for numpy (pyproject.toml): finished with status 'er...
I need to use this image in kubernetes
Phew. Make sense. I am testing it by updating FROM in dockerfile.
Fingers crossed.
AgitatedDove14 I am upgrade upgrading pip before this. 😕
RUN apk update && apk upgrade --no-cache RUN /usr/local/bin/python3 -m pip install --upgrade pip RUN /usr/local/bin/python3 -m pip install -r requirements.txt
😕 I will using docker_image python:3.9-alpine
I am running a basic python script. Need to use clearml to use it's API