Skip to content

chore: archive the advisor calibration harness beside its results - #41

Merged
voorhs merged 2 commits into
feat/advisor-calibration-laptop6gbfrom
feat/archive-advisor-calibration-harness
Aug 18, 2026
Merged

chore: archive the advisor calibration harness beside its results#41
voorhs merged 2 commits into
feat/advisor-calibration-laptop6gbfrom
feat/archive-advisor-calibration-harness

Conversation

@voorhs

@voorhs voorhs commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Archives the calibration harness beside the results it produced, and makes this experiment self-contained: it no longer references an AutoIntent branch anywhere.

Why

These seven scripts (plus their unit test) lived in deeppavlov/AutoIntent under scripts/. They were removed from that repo while preparing AutoIntent#291 for merge:

  1. They are validation instruments, not library code — and AutoIntent's scripts/ is load-bearing, since check-schema.yaml runs python -m scripts.generate_json_schema_config from it.
  2. test_calibration_tracker.py imported calibrate_advisor from scripts/, which is not a Python package. That import was one of the mypy failures blocking #291.

No branch references

The first draft of this PR asked AutoIntent to preserve feat/issue39-calibration-scripts forever, because reproduce.sh pinned to it. That was the wrong shape — an experiment should not hold another repo's branch lifecycle hostage — and it was also already too late:

$ git ls-remote https://github.com/deeppavlov/AutoIntent 'refs/heads/*issue39*'
$ git ls-remote https://github.com/deeppavlov/AutoIntent 'refs/pull/348/head'
b38f3c3a8612e177e76fe94552180ef43555665c        refs/pull/348/head

The branch is gone. The commit is not, and never will be: GitHub keeps every commit that belonged to a PR under refs/pull/<N>/head, merged or closed or neither. So the pin is now a commit plus the PR that owns it:

AUTOINTENT_COMMIT="${AUTOINTENT_COMMIT:-b38f3c3a8612e177e76fe94552180ef43555665c}"
AUTOINTENT_PR="${AUTOINTENT_PR:-348}"   # head of AutoIntent#348 (closed)

reproduce.sh fetches that commit by name, falls back to refs/pull/$AUTOINTENT_PR/head, falls back to a full fetch, then checks out detached. Both fetch paths were verified against the live remote from an empty repo.

reproduce.sh now runs this copy

Previously deferred to you as a judgement call; taken now, because leaving it was what made the branch load-bearing. reproduce.sh executes harness/ by absolute path and uses the AutoIntent checkout for one thing only: the advisor library and the venv around it. That is the single dependency this experiment should have, since the advisor is implemented in AutoIntent and must not be implemented anywhere else.

Making that work needed three path fixes, all of which are consequences of the files no longer living in <autointent>/scripts/:

File Change
run_calibration_banking77.sh Split REPO_ROOT into HARNESS_DIR (here) and AUTOINTENT_DIR (the venv). Relative *.yaml preset paths now resolve against HARNESS_DIR first — the cwd is someone else's repo now, so PRESETS=coverage_preset.yaml would otherwise silently miss.
run_phase2_isolated.sh Same split; calls the sweep driver by absolute path and forwards AUTOINTENT_DIR.
test_calibration_tracker.py Was broken by the verbatim copy. Its sys.path bootstrap pointed at parents[2]/"scripts", which does not exist in this repo — the test could not import its own subject. Now points at its directory.

Plus four text-only path corrections in docstrings/help (scripts/…harness/…). The advisor API surface the harness uses is untouched.

The pin is exact, not approximate

README.md credits 85848f2 with producing results/. The pinned b38f3c3a differs from it only under scripts/, which this experiment no longer reads:

$ git diff --stat 85848f27 b38f3c3a
 scripts/calibrate_advisor.py               |  90 ++++-
 scripts/phase1b_metadata_counterfactual.py | 191 +++++++++
 scripts/phase3_reduce_to_fit.py            | 284 +++++++++++++
 scripts/render_issue39_tables.py           | 116 ++++++
 scripts/run_calibration_banking77.sh       |   4 +-
 scripts/run_phase2_isolated.sh             |  38 ++

src/autointent/ is identical between the two, so the pinned library is literally the one that produced the archived numbers.

Moving the pin forward, when you want to

The pin sits behind dev deliberately. AutoIntent#291 renames autointent._advisor to the public autointent.advisor, renames inspectestimate and stats_from_dataset_objdataset_stats, moves PreflightError to autointent.advisor, and flips Pipeline.fit(preflight=…) to default "off" — so bumping AUTOINTENT_COMMIT past it needs code edits here, not just a new SHA. #291 also changes advisor behaviour, so a re-run against a newer pin is a new measurement rather than a reproduction of results/. harness/README.md spells out both halves.

Not changed

ISSUE_COMMENT.md still says "AutoIntent @ feat/feasibility-check 85848f2" — it is an archived transcript of a comment already posted to issue #39, and it already carries the commit. Left verbatim rather than rewritten after the fact.

Base

Targets feat/advisor-calibration-laptop6gb rather than main, since experiments/advisor-calibration-laptop6gb/ only exists there — this stacks on #40.

voorhs and others added 2 commits August 17, 2026 21:22
These scripts produced experiments/advisor-calibration-laptop6gb/results/ but
lived in deeppavlov/AutoIntent under scripts/. They were removed from that repo
while preparing AutoIntent#291 for merge: they are validation instruments
rather than library code, and one of them was imported by a test from
scripts/, which is not a package — a mypy failure that blocked the PR.

Copied verbatim from AutoIntent feat/issue39-calibration-scripts @ b38f3c3a
(the head of AutoIntent#348, now closed in favour of this archive).

reproduce.sh is deliberately left untouched: it still runs the harness from an
AutoIntent checkout pinned to that branch, which continues to work. harness/README.md
records what would have to change to run from this copy instead, and warns that
deleting the upstream branch is the one action that breaks reproduction.
The archive was insurance that nobody used: reproduce.sh still cloned
AutoIntent and ran the harness out of its scripts/, pinned to the branch
feat/issue39-calibration-scripts. That branch has since been deleted, so
the pin no longer resolves and reproduction is already broken.

Make the experiment self-contained. The only thing it takes from
deeppavlov/AutoIntent is the advisor library, which is where the advisor
belongs and must not be implemented anywhere else.

- reproduce.sh runs ./harness/ by absolute path; AUTOINTENT_REF becomes
  AUTOINTENT_COMMIT (b38f3c3a) plus AUTOINTENT_PR (348). The commit is
  fetched by name, then via refs/pull/348/head, then by full fetch, and
  checked out detached. No branch name on the path from clone to run.
  b38f3c3a's src/ is identical to 85848f2, the commit that produced
  results/ — they differ only under scripts/, which is no longer read.
- The two shell drivers assumed they lived in <autointent>/scripts/.
  Split that into HARNESS_DIR (here) and AUTOINTENT_DIR (the venv), and
  resolve relative *.yaml preset paths against HARNESS_DIR, since the cwd
  is now a different repo.
- test_calibration_tracker.py bootstrapped sys.path from
  parents[2]/"scripts", which does not exist here — it could not import
  its subject at all. Point it at its own directory.
- Drop the "do not delete that branch" warnings; record the commit and
  the PR that owns it instead, and document what moving the pin past
  AutoIntent#291 would cost.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@voorhs
voorhs merged commit 629745c into feat/advisor-calibration-laptop6gb Aug 18, 2026
@voorhs
voorhs deleted the feat/archive-advisor-calibration-harness branch August 18, 2026 13:10
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