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

Implement super_squash_history in HfApi #1639

Merged
merged 7 commits into from
Sep 5, 2023
Merged

Conversation

Wauplin
Copy link
Contributor

@Wauplin Wauplin commented Sep 5, 2023

Resolve #1636.

This PR adds support for the /super-squash endpoint in HfApi. This endpoint squashes all the commits on a specified branch. The goal is to avoid bad user experience when repos have thousands of commits. The squash operation is non-revertible and should be used with care. See docs.

Will be useful for recurrent commits cc @thomwolf. I added a squash_history argument to the CommitScheduler and HFSummaryWriter to squash the history after each commit.

(cc @Pierrci FYI)

@Wauplin
Copy link
Contributor Author

Wauplin commented Sep 5, 2023

cc @severo might be useful for datasets-server as well to clean the refs/convert/parquet branch?

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Sep 5, 2023

The documentation is not available anymore as the PR was closed or merged.

Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

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

Thanks for implementing it @Wauplin


<Tip warning={true}>

Once the history of a branch has been squashed, it is not possible to merge it back into another branch since
Copy link
Member

Choose a reason for hiding this comment

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

I'd nearly put a "DESTRUCTIVE ACTION" in all caps 😁

@Wauplin
Copy link
Contributor Author

Wauplin commented Sep 5, 2023

Thanks for the quick review @LysandreJik!

@severo
Copy link
Collaborator

severo commented Sep 5, 2023

cc @severo might be useful for datasets-server as well to clean the refs/convert/parquet branch?

Thanks. I created an issue here: huggingface/dataset-viewer#1774

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.

Support for super-squash commit history.
4 participants