Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display endpoint URL in whoami command #895

Merged
merged 6 commits into from
Jul 27, 2022

Conversation

juliensimon
Copy link
Contributor

This is a convenient way to check what hub endpoint you're logged on to (public hub, private hub, etc.):

% huggingface-cli whoami
https://private-hub.huggingface.cloud
juliensimon

The codebase has some informational messages with hard-coded references to huggingface.co. I've left these alone, maybe we should clean them up at some point.

@juliensimon juliensimon added enhancement New feature or request private-hub labels Jun 7, 2022
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jun 7, 2022

The documentation is not available anymore as the PR was closed or merged.

Copy link
Member

@julien-c julien-c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me!

@LysandreJik
Copy link
Member

Looks good to me, but I wonder if we shouldn't only print it when the endpoint is different to the default one. I think it would also warrant an explanation of what is being printed, something like:

% huggingface-cli whoami
juliensimon

Authenticated through private endpoint: https://private-hub.huggingface.cloud

WDYT?

@LysandreJik
Copy link
Member

I'm offering to only print it when it's different to the default one, as otherwise it may be a bit weird:

% huggingface-cli whoami
https://huggingface.co
juliensimon

My first reaction when seeing this is wondering why the devs left a random print statement in the code :)

@juliensimon
Copy link
Contributor Author

That's fine with me :)

@LysandreJik
Copy link
Member

I've opened a PR on your PR here to move the print statement as I was mentioning in my comment above: juliensimon#1

Let me know if this works for you, I find it clearer this way but open to different opinions :)

Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@LysandreJik LysandreJik merged commit 9e36e7a into huggingface:main Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request private-hub
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants