Skip to content

feat(cds): EQC corpus tooling and dataset EQC search#8

Closed
yellowcap wants to merge 11 commits into
mainfrom
cds-eqc-tooling
Closed

feat(cds): EQC corpus tooling and dataset EQC search#8
yellowcap wants to merge 11 commits into
mainfrom
cds-eqc-tooling

Conversation

@yellowcap

@yellowcap yellowcap commented Jun 19, 2026

Copy link
Copy Markdown
Member

Splits the CDS-side EQC work out of the evals-framework branch into its own PR.

What

Adds an EQC (Evaluation Quality Control) corpus pipeline for the CDS toolset:

  • cds.eqc package: discovery, fetch, parse, normalize, clean, and a model2vec semantic index over the corpus.
  • New tools: get_dataset_eqc and search_eqc.
  • scripts/fetch_eqc_corpus.py to build the corpus + index.
  • Tests + fixtures and docs.

Deployment (corpus baked into the image via build artifact)

The data/ corpus is gitignored, so it ships into the image as a CI artifact rather than being committed — keeping the 32M embedding model out of git history while keeping the runtime fully offline (no HuggingFace dependency):

  • .github/workflows/cds-eqc-data.yml (weekly + workflow_dispatch) builds the corpus + index and uploads toolsets/cds/data/ as the eqc-data artifact.
  • .github/workflows/deploy.yml downloads the latest successful eqc-data artifact into the cds build context before building, with an inline-build cold-start fallback. COPY . . then bakes it in.
  • Dockerfile copies the data into the image (no S3 pull).

First rollout: run cds-eqc-data.yml once via workflow_dispatch to publish the initial artifact; otherwise the first cds deploy takes the (slower) inline-build fallback. Because deploy only rebuilds cds on cds changes, trigger deploy.yml via workflow_dispatch to ship a refreshed weekly snapshot without a code change.

Notes

  • New CDS deps: numpy, model2vec, trafilatura; uv.lock regenerated.
  • Companion PR: the evals harness (branch evals).
  • Verified: 39 cds tests pass, ruff clean, and the built image serves search_eqc/get_dataset_eqc offline (--network none) from the baked-in corpus + bundled model.

ciaransweet and others added 10 commits June 11, 2026 21:42
* fix: address missing/incorrect steps in readme for initial deploy (and applied them)

* fix: unblock workflows for initial deploy
Add an EQC (Evaluation Quality Control) corpus pipeline for the CDS
toolset: discovery, fetch, parse, normalize, clean, and a model2vec
semantic index, exposed via the get_dataset_eqc and search_eqc tools.
Includes a snapshot script with S3 push/pull, a CI workflow to refresh
the corpus, and a Dockerfile step to pull the snapshot at build time.
- Dockerfile: always mkdir the cds data dir so the unconditional COPY
  succeeds for every toolset build (not just cds with a snapshot URI).
- lint: broaden the scripts/** ruff S-ignore to **/scripts/** (covers
  nested toolset scripts), drop a type-narrowing assert (S101), mark the
  request-jitter random as non-crypto (S311), and ignore boto3 stubs in
  mypy. Apply ruff format to the new EQC files.
@yellowcap

Copy link
Copy Markdown
Member Author

@ciaransweet for deployment of the EQC work, we need to build an index and add it to the instances somehow. Lets discuss how to best go about that. Not sure in K8s what the best way is (for instance, does the ECMWF k8s support S3 buckets?)

Publish the EQC corpus and semantic index (with the bundled embedding
model) as the `eqc-data` workflow artifact and download it into the cds
docker build context, so the deployed image is self-contained and works
offline. Replaces the half-wired S3 snapshot path, which deploy.yml never
fed and which left the index absent in deployment.

- cds-eqc-data.yml: upload data/ as `eqc-data` artifact; drop S3 steps
- deploy.yml: download latest `eqc-data` into the cds build context, with
  an inline-build cold-start fallback
- Dockerfile: drop CDS_EQC_S3_URI/S3 pull; keep the data COPY
- remove dead eqc_snapshot.py and unused boto3 dependency
- docs: describe the artifact flow
@ciaransweet
ciaransweet deleted the cds-eqc-tooling branch June 25, 2026 11:31
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