Skip to content

Conversation

@schmrlng
Copy link

@schmrlng schmrlng commented Nov 6, 2025

This PR

  • Passes through the currently unused dry_run argument (bug) and also adds the tqdm_class argument from HfApi.hf_hub_download -> hf_hub_download.
  • Adds the dry_run argument from HfApi.snapshot_download -> snapshot_download and also passes headers.

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.

Thanks a lot for noticing and fixing this! I just realized we haven't added the dry_run parameter to HfApi.snapshot_download either (see here compared to here). Would you mind fixing it as well so we're all good? :)

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@schmrlng schmrlng force-pushed the fix_hf_api_hf_hub_download branch from c3749f1 to 7d6d3cb Compare November 7, 2025 17:38
@schmrlng schmrlng changed the title Pass through additional arguments from HfApi.hf_hub_download Pass through additional arguments from HfApi download utils Nov 7, 2025
@schmrlng
Copy link
Author

schmrlng commented Nov 7, 2025

Thanks a lot for noticing and fixing this! I just realized we haven't added the dry_run parameter to HfApi.snapshot_download either (see here compared to here). Would you mind fixing it as well so we're all good? :)

Sure, done -- I've also passed through headers=self.headers there (let me know if this is undesired, but it's similar to hf_hub_download) and tried to fix the tests (we'll see what CI thinks; locally seems to work).

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