Skip to content

Calibration script fixes for issue #39 validation on constrained hardware - #348

Open
voorhs wants to merge 1 commit into
feat/feasibility-checkfrom
feat/issue39-calibration-scripts
Open

Calibration script fixes for issue #39 validation on constrained hardware#348
voorhs wants to merge 1 commit into
feat/feasibility-checkfrom
feat/issue39-calibration-scripts

Conversation

@voorhs

@voorhs voorhs commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Script-level changes needed to produce the laptop-6GB calibration deliverables for AutoIntent-experiments#39. The advisor source code is left untouched — this is validation, not fixes.

Changes

scripts/calibrate_advisor.py

  • Record is_feasible, headroom, severity_by_metric, and resolved model_name per driver on each CalibrationRow. Without these, a calibration JSON cannot answer the one question the advisor exists to answer, and a local preset swap can masquerade as "transformers-heavy".
  • Add inter-preset GPU leak detection (_LEAK_WARN_GB = 0.25): warns when VRAM still allocated after a preset finishes, which corrupts the next preset's measurement. This caught a false classic-light OOM during validation.
  • Fix cli_smoke divergence note: the ~10× drift was an apples-to-oranges n_trials artifact (the CLI has no n_trials flag), not a wrapper regression. Updated the note to reflect this.

scripts/run_calibration_banking77.sh

  • uv run preset-discovery fix.

New helper scripts

  • phase1b_metadata_counterfactual.py — re-predicts with correct model metadata to test whether verdicts are fallback artifacts
  • phase3_reduce_to_fit.py — exercises the reduce-to-fit path on real constrained hardware (the calibrator runs report-only, so this needs a separate Pipeline.fit(..., preflight=...) call)
  • render_issue39_tables.py — renders the definition-of-done tables straight from the run JSONs
  • run_phase2_isolated.sh — runs one preset per process to avoid inter-preset GPU contamination

Context

Validation ran on an RTX 3060 Laptop (6 GB VRAM, 16 GB RAM). All 4 fitted presets matched their advisor prediction. See the full write-up in the experiments repo PR.

…ware

Changes needed to produce the laptop-6GB calibration deliverables:

calibrate_advisor.py:
- Record is_feasible, headroom, severity_by_metric, and resolved model_name
  per driver on each CalibrationRow — without these a calibration JSON cannot
  answer the one question the advisor exists to answer, and a local preset
  swap can masquerade as 'transformers-heavy'
- Add inter-preset GPU leak detection (_LEAK_WARN_GB) to surface leftover
  VRAM that corrupts the next preset's measurement
- Fix cli_smoke divergence note: the ~10x drift was an apples-to-oranges
  n_trials artifact, not a wrapper regression

run_calibration_banking77.sh:
- uv run preset-discovery fix

New helper scripts:
- phase1b_metadata_counterfactual.py: re-predict with correct model metadata
- phase3_reduce_to_fit.py: exercise the reduce-to-fit path on real hardware
- render_issue39_tables.py: render definition-of-done tables from JSONs
- run_phase2_isolated.sh: one preset per process to avoid GPU contamination

Advisor source code is left untouched — this is validation, not fixes.
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