feature to get the compliment of a hash sample #72
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.
We need to be able to get both the held out data and the not held out data when making splits with
scripts/hash_sample.py
.I added a
--complement
flag to this script that just writes out the hashes that dont match thecalculate_md5_suffix
suffixes. I also updated the logging statement to reflect that it is doing this.I did a very rudimentary test by splitting a RedPajama file (
pretraining-data/sources/redpajama/v1/documents/split=train/dataset=c4/c4-train.00000-of-01024_00000.jsonl.gz
) this way at 5% and making sure that its hash sample and its compliment added up to the full number of documents (17932 + 338023 = 355955
).