diff options
Diffstat (limited to 'experiments/bci_v2_calibrated_smoke.py')
| -rw-r--r-- | experiments/bci_v2_calibrated_smoke.py | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/experiments/bci_v2_calibrated_smoke.py b/experiments/bci_v2_calibrated_smoke.py new file mode 100644 index 0000000..1c05783 --- /dev/null +++ b/experiments/bci_v2_calibrated_smoke.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python3 +"""Endpoint-free checks for calibration-split target selection.""" +import os +import sys + +sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from experiments.bci_v2_calibrated_run import ( + CALIBRATION_EPISODES, + TARGET_QUANTILES, + calibrate_targets, +) +from experiments.bci_v2_recovery_run import build_recovery_config +from sdil.bci_v2 import BCIV2 + + +def check_calibration_without_outcomes(): + cfg = build_recovery_config() + model = BCIV2(cfg, model_seed=901) + targets, report = calibrate_targets( + model, task_seed=902, seed_offset=900_000 + ) + assert report["episodes"] == CALIBRATION_EPISODES + assert report["quantiles"] == list(TARGET_QUANTILES) + assert report["uses_outcome_labels"] is False + assert len(targets) == len(TARGET_QUANTILES) + assert all( + targets[index] < targets[index + 1] + for index in range(len(targets) - 1) + ) + assert all(-2.0 < target < 2.0 for target in targets) + print("calibration targets use only independent cursor quantiles: exact") + + +if __name__ == "__main__": + check_calibration_without_outcomes() + print("ALL CALIBRATION-SPLIT MECHANICS CHECKS PASSED") |
