you can hack it with something like:Task._get_default_session().send_request("users", "get_all", json={"id": [<user-id>]})
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
Then I think users.get_all
would be right up your alley 🙂
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"?
Oh, well, yes, but then you'll get all the users 🙂
For getting user info I guess that's a reasonable hack with not much risk
I wouldn't mind going the requests
route if I could find the API end point from the SDK?
I think that users in open source are admins by default
I think you can just send empty payload for users.get_all
like this {}
and it will return all the users in your database 🙂
it's not supported natively in the APIClient
SuccessfulKoala55 , is this hack applicable for most API calls in ClearML?
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)
Don't even need to specify json=...
😉 Thanks!
RBAC is something you have in the paid versions 🙂
Ah, the API server /users.get_all
, I see!
you're better off with the default session - you need the auth info there on top of the endpoint
On it! Should I include the additional user filters described above?
I couldn't find it directly in the SDK at least (in the APIClient)... 🤔
clearml.backend_api.session.defs.ENV_HOST.get()
did not work unfortunately 🤔
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?
The UI uses it to access the list of users for presenting in the tasks table 🙂
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
😄
So some UI that shows the contents of users.get_all
?
Yeah, but I wouldn't recommend doing it 🙂