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