Skip to content

[DE-8690] Local EvaluationV2 over parquet: nucleus/evalv2 + nu evalv2 run (WIP) - #482

Draft
luke-e-schaefer wants to merge 1 commit into
masterfrom
luke/evalv2-portable-kernel
Draft

[DE-8690] Local EvaluationV2 over parquet: nucleus/evalv2 + nu evalv2 run (WIP)#482
luke-e-schaefer wants to merge 1 commit into
masterfrom
luke/evalv2-portable-kernel

Conversation

@luke-e-schaefer

Copy link
Copy Markdown
Contributor

WIP / draft — SDK-side companion to the scaleapi PR (scaleapi#161284). Ref: https://linear.app/scale-epd/issue/DE-8690

What & why

Run EvaluationV2 offline over exported parquet using the shared evalv2-core kernel (lives in scaleapi packages/evalv2-core). Because the SDK and the platform worker import the same kernel, local results match a platform run by construction (parity by design); pycocotools is the source of truth.

In this PR

  • nucleus/evalv2/parquet_io.pyParquetSource (a streaming sorted merge-join over predictions + ground_truth [+ items] parquets → ItemBundles; O(one item + batch) memory, so it handles tens of millions of rows without OOM) and ParquetSink (writes the result bundle: matches/per_threshold parquet + summary/charts JSON).
  • nucleus/evalv2/run.py + cli.pyrun_local_eval(...) and nu evalv2 run (--predictions/--ground-truth/--items/--out/--config/--iou-type/--class-agnostic/--min-prediction-score); the --config JSON reuses the kernel's exclusion-rule parser + rollup groups.
  • cli/nu.py — registers the evalv2 command group (guarded import so nu still works if the optional evalv2-core dep isn't installed).
nu evalv2 run --predictions preds.parquet --ground-truth gt.parquet --out ./result

Still planned

  • nu evalv2 upload — push the result bundle to the platform ingest endpoint (async job), to view the eval in-platform.

Verification / caveats

  • Isolated tests (adapter round-trip: parquet-run summary == in-memory-run summary; CLI via CliRunner) run without the heavy SDK import via --confcutdir + importlib (the repo-root conftest.py imports nucleus + requires an API key).
  • Before ready: wire evalv2-core as a real dependency (private index), version bump + CHANGELOG.md per repo convention.

🤖 Generated with Claude Code

…2 run` (WIP)

Adds the SDK-side local harness for the EvaluationV2 portable kernel: run an
evaluation offline over exported parquet using the shared evalv2-core kernel, so
results match a platform run by construction (parity by design).

- nucleus/evalv2/parquet_io.py: ParquetSource (streaming sorted merge-join over
  predictions + ground_truth [+ items] parquets -> ItemBundles; O(one item+batch)
  memory) and ParquetSink (result bundle: matches/per_threshold parquet +
  summary/charts JSON).
- nucleus/evalv2/run.py + cli.py: run_local_eval + `nu evalv2 run`
  (--predictions/--ground-truth/--items/--out/--config/--iou-type/
  --class-agnostic/--min-prediction-score); config JSON reuses the kernel's
  exclusion-rule parser + rollup groups.
- cli/nu.py: register the `evalv2` group (guarded import so `nu` still works if
  the optional evalv2-core dep isn't installed).

Draft/WIP. `nu evalv2 upload` (push result bundle to the platform ingest endpoint)
is a follow-up. Tests run isolated from the heavy SDK import via --confcutdir +
importlib. Before ready: wire evalv2-core as a real dependency (private index),
version bump + CHANGELOG.

Ref: https://linear.app/scale-epd/issue/DE-8690

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant