summaryrefslogtreecommitdiff
path: root/experiments/bci_v2_calibrated_smoke.py
diff options
context:
space:
mode:
authorYurenHao0426 <Blackhao0426@gmail.com>2026-07-23 08:12:22 -0500
committerYurenHao0426 <Blackhao0426@gmail.com>2026-07-23 08:12:22 -0500
commitd289a46293e0b422c195746ad8b310d4b50ded23 (patch)
tree1b5e7e57ca59ae32633a9ebc14bbfab886db7092 /experiments/bci_v2_calibrated_smoke.py
parent378e68dc424acb6b5a2082bc071314ce810d8ab5 (diff)
protocol: freeze calibration-split oral-B-v2 recovery
Diffstat (limited to 'experiments/bci_v2_calibrated_smoke.py')
-rw-r--r--experiments/bci_v2_calibrated_smoke.py36
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")