-
Notifications
You must be signed in to change notification settings - Fork 570
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
1173 Add dump env helper #1177
1173 Add dump env helper #1177
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. |
Codecov ReportBase: 84.82% // Head: 83.87% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1177 +/- ##
==========================================
- Coverage 84.82% 83.87% -0.95%
==========================================
Files 42 43 +1
Lines 4210 4261 +51
==========================================
+ Hits 3571 3574 +3
- Misses 639 687 +48
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! You could also edit the issue templates to request the command to be run before opening an issue. Right now it asks for the versions, but it would be simpler to just point to the command
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Agree on changing the templates
info["Has saved token ?"] = token is not None | ||
if token is not None: | ||
info["Token type"] = ( | ||
"Organization token" if token.startswith("hf_org") else "Personal token" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we can ever have an organization token saved right? The login fails for those (see https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/_login.py#L225 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep true, I'll remove it. Thanks :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes i was going to comment the same. Org tokens are on their way to deprecation anyways
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. |
Thanks both for the review !
Yes that's what I meant by " update issue template ?" in the todo list of the PR but it wasn't so clear 😄 Anyway, I updated it and will merge when CI is green. Hope it will prove to be useful in the future :) |
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. |
huggingface-cli env | ||
``` | ||
|
||
If your are working in a notebook, please run it in a code cell: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*you
@@ -177,3 +179,53 @@ def is_google_colab() -> bool: | |||
Taken from https://stackoverflow.com/a/63519730. | |||
""" | |||
return _is_google_colab | |||
|
|||
|
|||
def dump_environment_info() -> Dict[str, Any]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(nit) maybe link to transformers
diffusers
implementations for reference
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Resolve #1173. Should ease some debugging of issues from users.
TODO:
Inspired by existing work in
transformers
diffusers
(thanks @mariosasko)In terminal
From python
Output from ipython in terminal: