Reputation
Badges 1
49 × Eureka!😕 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
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?
` # 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...
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...
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?
I found a lot of questions from past chat in this group including by you related to k8 glue with clearml.
Do you mean it recently become part of enterprise version?
AgitatedDove14
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?
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?
AgitatedDove14 I am upgrade upgrading pip before this. 😕
How can it be even this kind of issue with Python when one endpoint is giving response and other not.
Worked with python:3.9.11 but didn't work with python:3.9.11-alpine 😮
This is crazy.
so I think it depends if python:3.9-alpine use x86
which I believe it might be probably
I see. It's showing since experiment started.
Thanks for the discussion 🙂
It helped me too.
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
Worked with Bullseye image. Thanks for the suggestion.
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. I am getting error in html output.
<noscript>Please enable JavaScript to continue using this application.</noscript>
This worked out.
`
from clearml.backend_api.session.client import APIClient
Create an instance of APIClient
client = APIClient()
project_list = client.workers.get_all()
print(project_list) `
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
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 ?
` 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.