Skip to content

Publish all 85 queries - #46

Merged
shreyashankar merged 4 commits into
mainfrom
claude/cuad-publish
Oct 11, 2026
Merged

shreyashankar merged 4 commits into
mainfrom
claude/cuad-publish

Conversation

@shreyashankar

@shreyashankar shreyashankar commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

All 85 queries now have published labels at every scale factor. Nothing is pending.

  • Corpora. PUBLISHED_CORPORA names three new corpora. Each one has the tables of the trace corpus for its scale factor plus the CUAD tables (contracts, clause_types). Before this change, the CUAD tables were in no corpus, so quail_b.run could not load them.
  • Labels. Each new corpus has one collection. It reuses the existing label sets, which is valid because the tables they read did not change. It also adds the 18 CUAD label sets, which come from the CUAD annotations.
  • Catalog. labels_pending is removed. The trace and sales queries were marked pending even though their labels were already in the bucket.
  • Planner estimates. The new filters and joins get selectivity estimates from the sf=0.1 labels.
  • Tool. tools/make_cuad_labels.py writes the new corpora and collections. --upload copies the unchanged tables inside the bucket.
  • Faster loading. The download cache read each S3 file through a random access file, which sends one HTTP request per 64 KB read. That ran at about 0.2 MB/s. It now reads a sequential stream, and load_benchmark fetches tables in parallel. At scale factor 1.0, a cold load takes 80 s and a warm one 6 s.
Scale factor Corpus ID Collection ID
0.1 c_e380e53469a6a62de83a452fbc51a73e gt_349c059f13738eaeb76d230361f3c219
0.5 c_38414b12549ab6243397fd41522e67ad gt_1d3d18a553eb491a99b425524c21ea16
1.0 c_3a8712778b5fe0938abe729770c4d23d gt_b81d2437aaa5080fd54c81d82833a3e5

These files are already uploaded. Against the bucket, at each scale factor:

  • All 18 tables are present, and the copies match the base corpus in size.
  • The labels loader accepts the collection, including its reuse records.
  • Every query has labels.
  • The CUAD tables read back from the bucket hash to the manifest.

Ruff, the long-string check, vulture, and pytest pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LnBPDnvaDsBDWZofvX25DU

`tools/make_cuad_labels.py <root> --extend-published` writes the files
that add the 18 CUAD label sets to the published ground truth: label
sets whose ids come from the published corpus, one new collection per
active collection of that corpus with the CUAD label sets added, and
the pointers naming the new collections. The corpus files are not
written, since the benchmark builds the CUAD tables from their
sources. `--upload` copies the files to the public bucket with the
machine's AWS credentials.

The local mirror the tool wrote before stays as the first form; it
reuses the published corpus id with a two-table manifest, so it must
not be uploaded.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0121QACZnjC3Gv6AnWnWSBB8
The tool now has one job: write the files that add the CUAD label
sets to the published ground truth, for every published scale factor,
and upload them with `--upload`. The local mirror mode is gone, since
the benchmark reads the labels from the bucket. The upload uses
boto3, which resolves the bucket's region and credentials the way the
AWS CLI does; pyarrow's S3 filesystem failed the bucket check with an
HTTP 400 on a machine with working credentials. After uploading, the
tool reads the pointers back from the bucket to confirm them.

The CUAD queries lose `labels_pending`, so `queries()` returns 65
queries over six document collections. The tests and docs that stated
50 now state 65.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0121QACZnjC3Gv6AnWnWSBB8
@shreyashankar shreyashankar changed the title Add a published-collection mode to the CUAD labels tool Publish the CUAD labels and queries Oct 11, 2026
The trace and sales queries were marked labels_pending although their
labels were in the bucket, on newer corpora than PUBLISHED_CORPORA
named. The CUAD tables were in no corpus, so quail_b.run could not
load them.

The labels tool now writes, for each scale factor, a corpus with the
trace corpus tables plus the CUAD tables, the CUAD label sets, and a
collection that reuses the existing label sets. The upload copies the
unchanged tables inside the bucket. PUBLISHED_CORPORA names the new
corpora, and labels_pending is removed: every query has labels at
every scale factor. The new filters and joins get selectivity
estimates from the sf=0.1 labels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LnBPDnvaDsBDWZofvX25DU
@shreyashankar shreyashankar changed the title Publish the CUAD labels and queries Publish all 85 queries Oct 11, 2026
The download cache copied each S3 file through a random access file,
which sends one HTTP range request per 64 KB read. Downloads ran at
about 0.2 MB/s, so the scale factor 1.0 tables alone took about 20
minutes. The cache now reads a sequential stream, reuses one S3
filesystem, and load_benchmark fetches tables in parallel. A cold load
at scale factor 1.0 takes 80 s and a warm one 6 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LnBPDnvaDsBDWZofvX25DU
@shreyashankar
shreyashankar merged commit 916428e into main Oct 11, 2026
1 check passed
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.

2 participants