Thanks again 🙌 , I managed to get the user's name like so
from clearml.backend_api.session.client import APIClient
client = APIClient()
task = client.tasks.get...
user_response = client.session.send_request(
"users", "get_by_id", json={"user": task.user}
).json()
user_name = user_response["data"]["user"]["name"]
yep that was my approached with no luck so far
hopefully someone from the ClearML dev team can give their input on this
I'm afraid I don't really know, you could check out the user settings in the UI, top right corner on the user icon, maybe there is something there, but I didn't really find anything to that extent there myself.
correct, but!
I wrote a script that pulls tasks and limit for user
so I'm looking for users to knows their own id
in advance
For my use case I poll tasks.get_all
which returns an object that contains the user ID: None
{
"id": "c2e33466fd9de1a0d2be8d803ad4fbed",
"company": "d1bd92a3b039400cbafc60a7a5b1e52b",
"name": "John Doe",
"family_name": "John",
"given_name": "Doe",
"created": "2024-09-24T06:13:59.956000+00:00"
}
this is how the object looks like
in the UI I also see the display name, so I pulled all the users info, and match name to id
how do you know the ID?
I'm looking for this ...
I will then assume that there is a users.get_by_id
as well? Fingers crossed! Thanks!
That said it would be great if they could add it to the documentation.
for some reason it's not in REST API docs, but I usedusers.get_all