anhtld commited on
Commit
a86d0a0
·
verified ·
1 Parent(s): aab697b

ctt artifacts 2026-07-02 workspace/scripts/eval_ctt_rollout.py

Browse files
workspace/scripts/eval_ctt_rollout.py ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python
2
+ from __future__ import annotations
3
+
4
+ import argparse
5
+ import sys
6
+ from pathlib import Path
7
+
8
+ PROJECT_ROOT = Path(__file__).resolve().parents[1]
9
+ if str(PROJECT_ROOT) not in sys.path:
10
+ sys.path.insert(0, str(PROJECT_ROOT))
11
+
12
+ from scripts.eval_metrics import main as eval_metrics_main # noqa: E402
13
+
14
+
15
+ def main(argv: list[str] | None = None) -> int:
16
+ parser = argparse.ArgumentParser(
17
+ description=(
18
+ "Evaluate CTT generated candidates after they have been rolled out. "
19
+ "This wrapper intentionally accepts measured candidate rows only; "
20
+ "use scripts/eval_ctt_proxy.py for distance-only support geometry."
21
+ )
22
+ )
23
+ parser.add_argument("--measured-candidates", type=Path, required=True)
24
+ parser.add_argument("--out-dir", type=Path, required=True)
25
+ parser.add_argument("--k", type=int, default=16)
26
+ parser.add_argument("--epsilon", type=float, default=0.0)
27
+ parser.add_argument("--bootstrap-samples", type=int, default=1000)
28
+ args = parser.parse_args(argv)
29
+
30
+ return eval_metrics_main(
31
+ [
32
+ "--input",
33
+ str(args.measured_candidates),
34
+ "--out-dir",
35
+ str(args.out_dir),
36
+ "--mode",
37
+ "measured",
38
+ "--k",
39
+ str(args.k),
40
+ "--epsilon",
41
+ str(args.epsilon),
42
+ "--bootstrap-samples",
43
+ str(args.bootstrap_samples),
44
+ ]
45
+ )
46
+
47
+
48
+ if __name__ == "__main__":
49
+ raise SystemExit(main())