[EPIC] pipekit-train: evaluation that compiles, and model selection that uses it

Open
#144 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python

Research direction

Read the child issues #122, #125, #153, and #154, then inspect the adapter's _evaluate path and HyperSweep result handling. Start with #122, which the issue says should establish _eval_step; follow the stated dependencies, and settle #125's open design questions before coding. Done means the child work is complete, the listed tracing and metric checks pass, validation metrics select the sweep winner, and the evaluation contract is documented.

Written by the indexing model from the issue text.

Description

area:code priority:p1 type:epic-theme

Theme

pipekit-train's evaluation runs compiled, gives exact metrics, and is what model selection actually ranks on.

Parent Wave

None. This comes from geostack report 11, workstream C, and from pipekit-train's open issues, and no geostack wave covers it.

Motivation

Evaluation is the slowest and least trusted part of a training run today.
The Equinox adapter's _evaluate calls loss_fn eagerly, so every eval batch dispatches each operation separately (#122).
HyperSweep ignores validation and ranks on the last training batch, which returned the wrong winner in a two-trial check: validation errors of 0.0 and 1.16, with the second trial winning (#153).
Non-mean metrics and sharded eval need padded batches and a mask, which pipekit_array.Padded now provides but the adapter doesn't use (#125).
These ship together because they all change one path, _evaluate and what happens to its result.

Issues

  • #122 Jit the eval step, keeping the ragged last batch and every existing task unchanged.
  • #125 Opt-in eval_fn(model, batch, key, valid) for padded, fixed-shape eval.
  • #153 HyperSweep ranks on validation metrics.
  • #154 Wire ValidationStep into the loop, or remove it.

Execution Notes

#122 lands first, because it is small and the others build on its _eval_step.
#153 can go in parallel, since it only keeps the result that _evaluate already returns.
#125 follows #122; settle its four open design questions in the issue before coding.
Recommended answers to start from: weight by valid.sum(), pad with a pytree copy of the last row, and detect with hasattr.
#154 goes last, and it may close as not planned if #125 covers its users.

Note for #125: pipekit_array.batch and Padded shipped in #121, and the pipekit-train half of #119 moved here when #119 closed.

Parallelism

  • Can run in parallel with: the other pipekit-train epics, though #145 and #146 also touch adapters/, so stack the PRs.
  • Blocked by (inside this wave): none.
  • Must complete before: none.

Definition of Done

  • All child issues closed.
  • With len(val) % batch_size != 0, the eval step traces twice over three eval rounds on the default path, and once with eval_fn.
  • Jitted eval gives the eager loop's metrics within float tolerance.
  • A two-trial sweep whose training and validation rankings disagree returns the validation winner.
  • Docs cover the eval contract.

Relationships

  • Parent: none.
  • Related: geostack docs/reports/11_pipekit_train.md, #145
Dominant language
Python
Stars
0
Forks
0
Avg merge
3h 50m
Merged PRs (30d)
143

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from jejjohnson/pipekit

All issues in jejjohnson/pipekit

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.