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 ability to enable/disable xet storage on a repo #2893

Draft
wants to merge 1 commit into
base: xet-integration
Choose a base branch
from

Conversation

hanouticelina
Copy link
Contributor

This PR updates update_repo_settings to add the ability to enable or disable xet storage.

Note: No test has been added for now as xet storage is not properly integrated into the staging environment (https://hub-ci.huggingface.co/) and we cannot test in production for an obvious reason: the CI would need to be the owner of the repo to be able to update this setting.
A proper test will be added once the staging environment supports xet storage.
cc @bpronan

@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.

@hanouticelina hanouticelina marked this pull request as draft February 28, 2025 13:46
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.

Looks good :) Let's wait for a CI though

if gated is None and private is None:
raise ValueError("At least one of 'gated' or 'private' must be provided.")
# Check if gated, private, and xet_enabled are None
if gated is None and private is None and xet_enabled is None:
Copy link
Contributor

Choose a reason for hiding this comment

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

if condition gets bigger we could move this check below and do a

if len(payload) == 0:
    raise ValueError("At least one setting must be updated.")

=> after that, no need to update it if we add more settings

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