Remove legacy pb.gz datasets in favor of their Parquet replacements - #284
Merged
Conversation
Deletes all 550 .pb.gz files under data/, leaving the 53 .parquet files as the only stored form of the corpus. No dataset is lost: 51 of the inputs have a same-id .parquet sibling, and the other 499 were consolidated by the un-sharding in #241 into two merged datasets -- 489 uspto-grants-YYYY_MM monthly buckets into ord_dataset-1158e351757f315b93cbcbe7bc55f38e (1,771,032 reactions) and 10 C8SC04228D shards into ord_dataset-e7830cd6b11158b43994ccfb5ee9acb3 (409,035). Coverage was checked two ways before deleting: convert_to_parquet.py --dry-run classified all 550 inputs and reported every output as already existing, and a row-count audit compared reaction counts across every pair, with the merged outputs matching their shard totals exactly. No .pb.gz was committed after its .parquet sibling, so no edit is stranded. Old objects stay retrievable from GitHub's LFS store for historical commits. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Member
Author
|
@greptileai review |
|
Too many files changed for review (550 files, 500 file limit). |
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.
Summary
Deletes all 550 legacy
.pb.gzfiles underdata/, leaving the 53.parquetfiles as the only stored form of the corpus. This is the data half of the Parquet-only migration; the tooling and documentation half is stacked on top in #256, which targets this branch.The split exists because a 550-file diff is past Greptile's review limit. There is deliberately no code in this PR — every reviewable change lives in #256.
No dataset is lost
Of the 550 deleted inputs, 51 have a same-id
.parquetsibling and the other 499 were consolidated by the un-sharding in #241:Dataset.nameuspto-grants-YYYY_MMord_dataset-1158e351757f315b93cbcbe7bc55f38euspto-grantsTraining data from https://doi.org/10.1039/C8SC04228D (N/10)ord_dataset-e7830cd6b11158b43994ccfb5ee9acb3Training data from https://doi.org/10.1039/C8SC04228DAs paths:
Those two are the only dataset ID changes. Every other dataset kept its ID, so for those only the suffix changes. Per-reaction patent provenance for the USPTO data is still on
Reaction.provenance.patent, so the monthly bucket a reaction came from remains recoverable without the per-month datasets.How coverage was verified
scripts/convert_to_parquet.py --dry-runclassified all 550 inputs as 51 singletons, 489uspto-grantsshards and 10C8SC04228D-trainingshards, and reported all 53 outputs as already existing. The two merged outputs are addressed by the id the script derives from its sorted source ids, so the paths it reports as existing are themselves the check that the merge groups are exactly these inputs..pb.gzand compared reaction counts against the Parquet files: every singleton matches its same-id sibling, and both merged outputs match their shard totals exactly.ord_dataset-ac78456835404910b3a4c840248b6ac9andord_dataset-d319c2a22ecf4ce59db1a18ae71d529c, differ only inDataset.description, where the Parquet carries the whitespace fix from Insert the missing whitespace in two dataset descriptions #259 and the.pb.gzwas left stale. Every reaction in both is byte-identical, so the Parquet is the better copy in each case..pb.gzwas ever committed after its.parquetsibling, so no later edit is stranded — which matters becauseprocess_dataset.pykeeps an edited dataset in the format it already has and would not have refreshed the sibling.data/is byte-for-byte the same set of 53 Parquet files asmain.Updating downstream code
Read datasets with
ord_schema.datasets.load_dataset(path), which dispatches on suffix and returns a streamingDatasetViewfor Parquet; passas_dataset=Truewhen you need a materializedDatasetfor serialization or mutation.message_helpers.load_messagehas no Parquet path. The README examples in #256 show both, and the API notes there go into more detail.Notes for review
scripts/upload_to_huggingface.pymapsDentries toCommitOperationDelete, a directly tested path, and with no uploads in the plan the LFS pull short-circuits — so this lands as one HF commit of 550 deletes with no LFS transfer.mainstill documents.pb.gzas the storage format, and the mirror republishes it as the HF dataset card in this same commit. Assert validation coverage and finish the Parquet-only migration #256 rewrites it, so it should merge immediately after this one..lfsconfigroutes LFS reads to the HF mirror, so a checkout of a pre-merge commit resolves the deleted.pb.gzoids against a mirror whose HEAD no longer references them. Theverify-hf-mirrorskill reports all 603 objects onmainserved by HF today, and HF still serves an object superseded by Insert the missing whitespace in two dataset descriptions #259 a month ago and unreferenced since — its LFS store keeps objects that a git deletion drops. Those objects also stay in GitHub's LFS store, which is where writers push.skip-update-submissionsoprocess_dataset.pydoes not re-process the deletions..gitattributeskeeps the*.pb/*.pb.gzLFS filters underdata/. They match nothing after this merge: a submission is staged at the repository root, where no LFS filter applies, andprocess_dataset.py --updatewrites it intodata/as Parquet. They stand as a safety net for a deliberate--output_formatwrite, not for the submission path.🤖 Generated with Claude Code