-
Notifications
You must be signed in to change notification settings - Fork 817
Use git xet transfer to check if xet is enabled #3381
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
Conversation
class TestXetE2E(TestXetUpload): | ||
@pytest.mark.usefixtures("xet_setup") | ||
class TestXetE2E: |
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.
Unrelated to the PR but i realized we were running TestXetUpload
twice with this inheritance 🙃 fixed it here
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. |
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.
Thank you!
# - the files are provided as str or paths objects, | ||
# - the library is installed. | ||
# Otherwise, default back to LFS. | ||
xet_enabled = self.repo_info( |
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.
all of this to remove this call 😄
|
||
|
||
@pytest.fixture | ||
def xet_setup(request, tmp_path): |
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.
clean!
Co-authored-by: Lucain <[email protected]>
…e/huggingface_hub into use-xet-transfer-in-lfs-calls
Related to https://github.com/huggingface-internal/moon-landing/pull/14572 (private) and huggingface/huggingface.js#1761.
This PR removes the client-side check to
/api/{repo_type}s/{repo_id}?expand[]=xetEnabled
to know if xet is enabled when uploading, transfer selection is now determined by the server via the Git LFS Batch API. the negotiated transfer (basic, multipart or xet) is known only once we've queried the batch API. the client tells the server when xet is supported (if hf-xet is available, the input is not a BytesIO, and HF_HUB_DISABLE_XET is not set to 1.