Write clear Hugging Face commit messages#11
Merged
Merged
Conversation
Every hub commit used a fixed "arctic shard commit" summary, so the dataset history said nothing about what landed. Build the summary and description from the files in the commit instead: the type and month, the shard range, the file count, and the total size, with each file and its size listed in the body. A browser looking at the commit history now sees "Add comments 2021-05 shards 061-064 (4 files, 1.8 GB)" at a glance.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every Hugging Face commit carried the same "arctic shard commit" summary, so the dataset's commit history told a browser nothing about what each commit actually added.
This builds the summary and description from the files in the commit:
Add comments 2021-05 shards 061-064 (4 files, 1.8 GB)— type, month, shard range, file count, total size.The message is derived purely from the files already in the commit, so no context needs threading down through the upload path.
Tested:
commitmsg_test.gocovers the add-range, single-shard, mixed-month, with-deletes, and byte-formatting cases. Full arctic package tests pass.