-
Notifications
You must be signed in to change notification settings - Fork 608
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
Uniformize hf_api
a bit and add support for Spaces
#792
Conversation
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.
Some of the changes here are breaking changes. I think we should introduce a deprecation cycle like the other PRs if we're breaking API.
@adrinjalali I think only two lines in this diff are potential breaking changes, so I'll revert them. Other than that i don't think there any BC, but I'll check |
Weird that CI didn't trigger on your PR |
@LysandreJik probably GitHub being a bit down |
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.
Other than the sha
addition as a kwarg to DatasetInfo
to correspond better to the ModelInfo
, I don't see a breaking change; did I miss anything @adrinjalali?
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.
We also need to document the new methods in the README here.
Added documentation for the methods that weren't touched by #782 so that everything is in the same format. |
BTW feel free to rebase this on |
Yes, will now rebase on |
0616aaf
to
9049f06
Compare
The documentation is not available anymore as the PR was closed or merged. |
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.
Should the new methods also be included in a user guide?
I should have addressed all comments.
They'll be in the API reference on merge, which I think is a good first step. |
Need to patch the failure. |
The switch from @adrinjalali, please let me know if that works for you, and if so, if we can merge this PR. |
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.
mostly cosmetic comments, except HfFolder.get_token()
. I think if a new method is failing on using validate_or_retrieve_token
, it's in the scope of the same PR to see why it'd fail. We have 9 instances of using _validate_or_retrieve_token
and only two HfFolder.get_token()
. We don't have to remove the existing ones here, but new code shouldn't be use it.
Thanks for your feedback. I've taken care of all your comments, except regarding the
that would be sensible, but the two methods are not designed to work together. The That's exactly what
In the case where no acceptable token is passed and the user isn't logged-in, then it should still work. Updating to use Furthermore, I think that since |
Rebasing on |
For me this is slightly less clean, but will defer to others
h/t @adrinjalali Co-authored-by: Adrin Jalali <[email protected]>
This reverts commit 1d1ec51.
Co-authored-by: Adrin Jalali <[email protected]>
Co-authored-by: Adrin Jalali <[email protected]>
a05ad04
to
b0ca349
Compare
Ok, opened #837 to discuss the token issue. Happy to merge this as is and fix that issue later. |
No description provided.