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

Add token parameter to HfApi's snapshot_download and hf_hub_download #1717

Merged
merged 2 commits into from
Oct 10, 2023

Conversation

mariosasko
Copy link
Contributor

Adds a token parameter to HfApi's snapshot_download/hf_hub_download to be consistent with the rest of the methods.

(It would come in handy in huggingface/datasets#6269 🙂)

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Oct 8, 2023

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

@codecov
Copy link

codecov bot commented Oct 8, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (f752932) 82.51% compared to head (5871d42) 82.47%.
Report is 1 commits behind head on main.

❗ Current head 5871d42 differs from pull request most recent head 12fedf2. Consider uploading reports for the commit 12fedf2 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1717      +/-   ##
==========================================
- Coverage   82.51%   82.47%   -0.05%     
==========================================
  Files          62       62              
  Lines        7262     7262              
==========================================
- Hits         5992     5989       -3     
- Misses       1270     1273       +3     
Files Coverage Δ
src/huggingface_hub/hf_api.py 86.55% <ø> (ø)

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

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

Makes sense!

@Wauplin Wauplin merged commit 33b0405 into main Oct 10, 2023
15 checks passed
@Wauplin Wauplin deleted the hf-api-download-token branch October 10, 2023 10:01
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

Wauplin added a commit that referenced this pull request Oct 10, 2023
…wnload` (#1717)

* Add `token` parameter to `HfApi`'s `snapshot_download` and `hf_hub_download`

* allow token=False

---------

Co-authored-by: Lucain Pouget <lucainp@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants