![Profile picture](https://clearml-web-assets.s3.amazonaws.com/scoold/avatars/DrabCockroach54.png)
Reputation
Badges 1
49 × Eureka!I see it now.
` "5451af93e0bf68a4ab09f654b222ccae": {
"1b790a3da2e8d6cd939cf271694fe81b": {
"metric": ":monitor:gpu",
"variant": "gpu_0_utilization",
"value": 0.0,
"min_value": 0.0,
"max_value": 3.542
},
"409d4e6ad9b69b3224fceeac6e265ddc": {
"metric": ":monitor:gpu",
"variant": "gpu_0_mem_used_gb",
"value": 0.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...
CostlyOstrich36 May I know what are the request params to get task urls, tasks.task_urls()
It would be great to have possible fields in the given parameters mentioned here: https://clear.ml/docs/latest/docs/references/api/tasks#post-tasksget_all
Any clue how do I figure out those?
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 attr...
I see. It's showing since experiment started.
Thanks for the discussion 🙂
It helped me too.
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.
Phew. Make sense. I am testing it by updating FROM in dockerfile.
Fingers crossed.
Still failing but I know the root cause though.
Eg. To query tasks that are both Running --> You mean status=["in_progress"] ?? How do I figure out other possible parameter I can use with status parameter?
Another,
Filter only tasks that start say 10 min ago . Is there any parameter for it also ?
so I think it depends if python:3.9-alpine use x86
which I believe it might be probably
Worked with Bullseye image. Thanks for the suggestion.
SuccessfulKoala55 Thanks. Last one. How do use this task_urls ?
We are running workers as bare metal and clearml-server on Kubernetes. I was trying to find, what are those min and max value for above metrics.
What do you mean by how much is reserved ? Are you running with an agent?
Thanks for the reply. If gpu_0_mem_usage is % of GPU memory in use, what is gpu_0_utilization ?
Is gpu_0_utilization also in % then?
` # 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...
Nice. Does it read those automatically just like it does from ~/clearml.conf? I don't need to call these environment variables within the Python code?