summaryrefslogtreecommitdiff
path: root/experiments/baseline_smoke.py
diff options
context:
space:
mode:
authorYurenHao0426 <Blackhao0426@gmail.com>2026-07-22 05:31:43 -0500
committerYurenHao0426 <Blackhao0426@gmail.com>2026-07-22 05:31:43 -0500
commitb329856d15b91a6f31fb75f010f0a550cddd0ee8 (patch)
treeb141022ae44dbd2fc5a893fe1e93de47fd13b6cc /experiments/baseline_smoke.py
parent66d22eb2c82cee95b670f4a7ad1a8b5c8d7885cc (diff)
baselines: audit native author runs
Diffstat (limited to 'experiments/baseline_smoke.py')
-rw-r--r--experiments/baseline_smoke.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/experiments/baseline_smoke.py b/experiments/baseline_smoke.py
index c656a2f..324e333 100644
--- a/experiments/baseline_smoke.py
+++ b/experiments/baseline_smoke.py
@@ -8,6 +8,8 @@ sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from sdil.data import onehot
from sdil.local_baselines import FANet, PEPITANet, FFNet, EPNet
from sdil import probes
+from experiments.import_native_baseline import (summarize_burst_history,
+ summarize_dualprop_hist)
def check_fa_residual_transport():
@@ -133,9 +135,40 @@ def check_ep_energy_dynamics():
print("EP free particles persist across presentations")
+def check_native_result_selection():
+ burst_rows = [
+ {"epoch": 0, "epoch/top1_error/test": 30.0,
+ "epoch/top1_error/val": 28.0, "_runtime": 10.0},
+ {"epoch": 1, "epoch/top1_error/test": 20.0,
+ "epoch/top1_error/val": 22.0, "_runtime": 20.0},
+ {"epoch": 2, "epoch/top1_error/test": 21.0,
+ "epoch/top1_error/val": 18.0, "_runtime": 30.0},
+ ]
+ burst = summarize_burst_history(burst_rows, 3)
+ assert burst["primary_final_test_accuracy_percent"] == 79.0
+ assert burst["validation_selected_epoch"] == 2
+ assert burst["validation_selected_test_accuracy_percent"] == 79.0
+ assert burst["test_selected_epoch"] == 1
+ assert burst["test_selected_test_accuracy_percent"] == 80.0
+
+ dual = summarize_dualprop_hist({
+ "train_loss": [2.0, 1.0], "train_accuracy": [30.0, 70.0],
+ "train_time": [4.0, 5.0], "val_loss": [1.5, 1.2],
+ "val_accuracy": [60.0, 65.0], "val_top5accuracy": [90.0, 92.0],
+ "val_time": [1.0, 1.5], "test_loss": 1.1,
+ "test_accuracy": 64.0, "test_top5accuracy": 93.0, "test_time": 2.0,
+ }, 2)
+ assert dual["validation_selected_epoch"] == 2
+ assert dual["primary_test_accuracy_percent"] == 64.0
+ assert dual["test_evaluations"] == 1
+ assert dual["wall_s"] == 13.5
+ print("native final/validation-selected/test-selected semantics: exact")
+
+
if __name__ == "__main__":
check_fa_residual_transport()
check_pepita_output_rule()
check_ff_local_optimization()
check_ep_energy_dynamics()
+ check_native_result_selection()
print("ALL BASELINE SMOKE CHECKS PASSED")