Skip to content

Fix/optimize job - #6

Merged
aregee merged 4 commits into
mainfrom
fix/optimize-job
Sep 11, 2026
Merged

aregee merged 4 commits into
mainfrom
fix/optimize-job

Conversation

@aregee

@aregee aregee commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

What this changes

A short description.

Why

The problem or motivation.

Checklist

  • ruff check . is clean
  • pytest -q is green without a model key (credential-free)
  • make demo still runs
  • No secrets, local paths, or run artifacts committed
  • No manufactured wins — any loss or limit is reported honestly
  • New sample cases are true-by-construction (see CONTRIBUTING)

aregee and others added 4 commits September 11, 2026 01:41
… 500 on a long run

The 150-per-task report run died at calibrate: POST /v1/judges/{role}/optimize ran the
optimizer subprocess inside the request with a hardcoded ten-minute limit, so 315 training
and 135 dev cases raised subprocess.TimeoutExpired and a 500 (the 90-row runs fit, so no test
caught it). Calibrate now runs on the grade-job pattern: background true answers 202 with a
job id; the record lives with the grade jobs under the workspace out dir (kind optimize, the
role, the agent, the full result block with delta, out_of_sample, corpus_source and the pin);
GET /v1/jobs/{id} reports it; GET /v1/jobs filters by kind; a restart reads as interrupted
and cannot be resumed as a grade; a second calibration of the same role is 409, while a
running calibration no longer blocks a grade. The limit is LITHRIM_OPTIMIZE_TIMEOUT_S (default
four hours), and a timeout is a failed job with nothing pinned (504 on the synchronous path);
the per-case grade limit is LITHRIM_GRADE_TIMEOUT_S (default 600).

Shell: the judge editor starts the calibration as a job, polls it with backoff, finds a
running one again on mount, says it is safe to reload, and shows the service's reason on
failure; the grade restore ignores calibration jobs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…a reload

The before round was reachable only from the import card right after a load; after a reload
or a lost browser the only way to grade was 'Grade all cases', which grades both splits.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@aregee
aregee merged commit 6d05a3c into main Sep 11, 2026
2 checks 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.

1 participant