Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
I Realize I'M Asking Many Niche Questions - My Apologies

I realize I'm asking many niche questions - my apologies 🙈
Is there a way to translate task.data.user (user ID) to the actual username?
Use case is that I'd like to add the Slack Monitor service, but filter out several user IDs (e.g. "default user", and some machine-specific users, etc)

  
  
Posted 2 years ago
Votes Newest

Answers 30


I think that users in open source are admins by default

  
  
Posted 2 years ago

I think you can just send empty payload for users.get_all like this {}
and it will return all the users in your database 🙂

  
  
Posted 2 years ago

I wouldn't mind going the requests route if I could find the API end point from the SDK?

  
  
Posted 2 years ago

and it's an auto-refreshed token

  
  
Posted 2 years ago

Yeah, but I wouldn't recommend doing it 🙂

  
  
Posted 2 years ago

Don't even need to specify json=... 😉 Thanks!

  
  
Posted 2 years ago

yeah, sure 🙂

  
  
Posted 2 years ago

clearml.backend_api.session.defs.ENV_HOST.get() did not work unfortunately 🤔

  
  
Posted 2 years ago

It's of course not an MLOps issue so I understand it's not high on the priority list, but would be kinda cool to just have a simple view presenting the content of users.get_all 😄

  
  
Posted 2 years ago

Follow up on this btw, from the WebUI/Server POV, I see there's an "Admin" role, etc. Do those have additional views available, such as users etc?

  
  
Posted 2 years ago

The UI uses it to access the list of users for presenting in the tasks table 🙂

  
  
Posted 2 years ago

Ah, the API server /users.get_all , I see!

  
  
Posted 2 years ago

you're better off with the default session - you need the auth info there on top of the endpoint

  
  
Posted 2 years ago

Sorry, not necessarily RBAC (although that is tempting 😉 ), but for now was just wondering if an average joe user has access to see the list of "registered users"?

  
  
Posted 2 years ago

We'll appreciate a PR 🙂

  
  
Posted 2 years ago

it's not supported natively in the APIClient

  
  
Posted 2 years ago

🙂

  
  
Posted 2 years ago

So some UI that shows the contents of users.get_all ?

  
  
Posted 2 years ago

Oh, well, yes, but then you'll get all the users 🙂

  
  
Posted 2 years ago

SuccessfulKoala55 , is this hack applicable for most API calls in ClearML?

  
  
Posted 2 years ago

Let me try that real quick

  
  
Posted 2 years ago

On it! Should I include the additional user filters described above?

  
  
Posted 2 years ago

you can hack it with something like:
Task._get_default_session().send_request("users", "get_all", json={"id": [<user-id>]})

  
  
Posted 2 years ago

Then I think users.get_all would be right up your alley 🙂

  
  
Posted 2 years ago

RBAC is something you have in the paid versions 🙂

  
  
Posted 2 years ago

So no direct page to see e.g. how many people have registered and/or if someone accidentally made two (or more) accounts, or somewhere to just delete users, etc

  
  
Posted 2 years ago

Yeah that works fine 😄 I just fetch it once to map argparse users to their IDs for later filtering.

The Slack Monitoring example should be updated btw, as they now use slack_sdk instead of slack (in the import statements)

  
  
Posted 2 years ago

For getting user info I guess that's a reasonable hack with not much risk

  
  
Posted 2 years ago

I couldn't find it directly in the SDK at least (in the APIClient)... 🤔

  
  
Posted 2 years ago
985 Views
30 Answers
2 years ago
one year ago
Tags