Repository navigation
fix(regression): let CI run the confidence guard again - #28
Merged
Merged
Conversation
… decision `test_confidence_map_matches_its_baseline` carried `machine_specific` while its own docstring argued, correctly, that it deliberately does not. The mark won, so from 2026-09-06 CI never ran it -- and it is the only live check that the confidence map still varies. Flattening it again, the exact defect Step 3 removed, would have passed everything CI runs. Checked before removing the mark rather than trusting either side: none of the three asserted quantities is a per-fold argmax. `n_confidence_maps` counts `confidence_values.npy`, which is one aggregated map per *target*, not per fold, so a target's map goes flat only if every fold in its ensemble collapsed; the other two are a count and a sign. I first split this test in two on the assumption that the flat-map count was per-fold and therefore CPU-fragile, and the perturbation output (`maps=1` on a one-target dataset) is what showed the assumption was wrong. The split is reverted; only the mark changes. Perturbed: forcing every map constant fails swiss_roll with the Step-3 message, and `-m "not machine_specific"` now selects the test. Local `--core` green. ADR 2.9d gains the rule the two mistakes share -- a CI-visible test reads the live run, never only the baselines, and asserts only what does not depend on which Optuna trial won -- and 2.13 records that EMUSES keeps the subject indexing it is given (Chris): a UMAP model pickles its training data, so it is unshareable with or without ids, and stripping them would cost a reconstruction step for no real safety. Keeping a restricted model private is the operator's job; `cohort.json` stays a digest unless `--record_cohort_ids` is passed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DrLKJZx7PmzAsZJCUiYm5g
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
test_confidence_map_matches_its_baselinecarried@pytest.mark.machine_specificwhile its own docstring argued, correctly, that it deliberately does not. The mark won, so from 2026-09-06 CI never ran it — and it is the only live check that the confidence map still varies. Flattening it again, the exact defect Step 3 removed, would have passed everything CI runs. The other guard on that path reads the baselines only and, in its own words, "cannot see a change in the code at all".Checked before removing the mark, rather than trusting either side: none of the three asserted quantities is a per-fold argmax.
n_confidence_mapscountsconfidence_values.npy, which is one aggregated map per target, not per fold, so a target's map goes flat only if every fold in its ensemble collapsed. The other two are a count and a sign.Worth saying plainly: I first split this test in two, on the assumption that the flat-map count was per-fold and therefore CPU-fragile. The perturbation output —
maps=1on a one-target dataset — is what showed the assumption was wrong. That split is reverted; only the mark changes.Perturbed: forcing every map constant fails swiss_roll with the Step-3 message, and
-m "not machine_specific"now selects the test (17 selected, up from 14). Local--coregreen, 17/17 suites.ADR. 2.9d gains the rule the two recent mistakes share: a CI-visible test reads the live run, never only the baselines, and asserts only on what does not depend on which Optuna trial won — scores, composites, cluster counts and per-fold estimator choices do; a config-fixed count, a sign, and "did this collapse entirely" do not. 2.13 records that EMUSES keeps the subject indexing it is given: a UMAP model pickles its training data, so it is unshareable with or without ids, and stripping them would cost a reconstruction step for no real safety. Keeping a restricted model private is the operator's job;
cohort.jsonstays a digest unless--record_cohort_idsis passed.🤖 Generated with Claude Code
https://claude.ai/code/session_01DrLKJZx7PmzAsZJCUiYm5g