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

feat(hub): adding pathsInfo function #1031

Merged

Conversation

axel7083
Copy link
Contributor

@axel7083 axel7083 commented Nov 15, 2024

Description

Following discussion #1024 and incompatibility of using the HEAD request to get the same etag as the python library is using for populating the cache directory.

This PR add the pathsInfo function that return the paths information including the LFS oid (or etag) if the file is a LFS pointer.

As suggested by @coyotte508 in #1024 (review)

Related issues

Fixes #1023 (provide an alternative method to fileDownloadInfo.

Tests

  • unit tests has been added

Copy link
Member

@coyotte508 coyotte508 left a comment

Choose a reason for hiding this comment

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

Thank you!

You should export the function in lib/index.ts

@coyotte508 coyotte508 merged commit 8fc1f6e into huggingface:main Nov 15, 2024
4 checks passed
@julien-c
Copy link
Member

great contrib @axel7083

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.

bug(@huggingface/hub): fileDownloadInfo return an etag for LFS file which seems weird
3 participants