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 get_hf_file_metadata Functionality #142

Merged
merged 7 commits into from
Dec 12, 2024
Merged

Conversation

ardaatahan
Copy link
Contributor

This PR brings over the get_hf_file_metadata function from huggingface_hub Python library.

This is useful for a couple reasons:

  • Check if local file's content size matches the remote file's to verify integrity of download
  • To let us know if the remote file changed based on commit hash

@ZachNagengast ZachNagengast requested a review from pcuenca December 9, 2024 19:40
Copy link
Member

@pcuenca pcuenca left a comment

Choose a reason for hiding this comment

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

Amazing and clean contribution, thanks a lot and sorry for the delay 🙏

Could you please double check the values returned in one of the tests? I was getting different results, as explained. We can merge once that is resolved!

Tests/HubTests/HubApiTests.swift Outdated Show resolved Hide resolved
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
@pcuenca pcuenca merged commit 37e234e into huggingface:main Dec 12, 2024
1 check passed
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.

2 participants