manual-sync chart-synthesis 2026-07-02T22:45:08Z workspace/scripts/build_paper_analysis.py
Browse files
workspace/scripts/build_paper_analysis.py
CHANGED
|
@@ -29,6 +29,8 @@ OUT_CAR_TABLE = LATEX_TABLES_DIR / "car_decomposition.tex"
|
|
| 29 |
GENERATOR_V2_MEMORY_EVAL = RESULTS_DIR / "generator_v2_positive_tangent_memory_eval.json"
|
| 30 |
GENERATOR_V2_LOCAL_ATLAS_EVAL = RESULTS_DIR / "generator_v2_positive_tangent_local_atlas_pool16_eval.json"
|
| 31 |
GENERATOR_V2_LOCAL_ATLAS_SWEEP = RESULTS_DIR / "generator_v2_positive_tangent_local_atlas_sweep_summary.json"
|
|
|
|
|
|
|
| 32 |
GENERATOR_V2_CVAE_EVAL = RESULTS_DIR / "generator_v2_positive_tangent_cvae_eval.json"
|
| 33 |
GENERATOR_V2_CVAE_SWEEP = RESULTS_DIR / "generator_v2_positive_tangent_cvae_sweep_summary.json"
|
| 34 |
GENERATOR_V2_SPLINE_CVAE_EVAL = RESULTS_DIR / "generator_v2_positive_tangent_spline_cvae_eval.json"
|
|
@@ -1889,6 +1891,47 @@ def _load_generator_v2_local_atlas_support_proxy() -> dict[str, Any]:
|
|
| 1889 |
}
|
| 1890 |
|
| 1891 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1892 |
def _load_generator_v2_cvae_support_proxy() -> dict[str, Any]:
|
| 1893 |
source = GENERATOR_V2_CVAE_EVAL
|
| 1894 |
sweep_best: dict[str, Any] | None = None
|
|
@@ -2353,6 +2396,7 @@ def _render_markdown(report: dict[str, Any]) -> str:
|
|
| 2353 |
)
|
| 2354 |
support_proxy = report.get("generator_v2_support_proxy", {})
|
| 2355 |
local_atlas_proxy = report.get("generator_v2_local_atlas_support_proxy", {})
|
|
|
|
| 2356 |
cvae_proxy = report.get("generator_v2_cvae_support_proxy", {})
|
| 2357 |
spline_proxy = report.get("generator_v2_spline_cvae_support_proxy", {})
|
| 2358 |
flow_proxy = report.get("generator_v2_spline_flow_support_proxy", {})
|
|
@@ -2439,6 +2483,7 @@ def _render_markdown(report: dict[str, Any]) -> str:
|
|
| 2439 |
"|---|---:|---:|---:|---:|---:|",
|
| 2440 |
_generator_support_compare_row("memory", support_proxy),
|
| 2441 |
_generator_support_compare_row("local-atlas", local_atlas_proxy),
|
|
|
|
| 2442 |
_generator_support_compare_row("raw-cvae", cvae_proxy),
|
| 2443 |
_generator_support_compare_row("spline-cvae", spline_proxy),
|
| 2444 |
_generator_support_compare_row("spline-flow", flow_proxy),
|
|
@@ -2578,6 +2623,9 @@ def build_report() -> dict[str, Any]:
|
|
| 2578 |
"generator_v2_local_atlas_support_proxy": (
|
| 2579 |
_load_generator_v2_local_atlas_support_proxy()
|
| 2580 |
),
|
|
|
|
|
|
|
|
|
|
| 2581 |
"generator_v2_cvae_support_proxy": _load_generator_v2_cvae_support_proxy(),
|
| 2582 |
"generator_v2_spline_cvae_support_proxy": (
|
| 2583 |
_load_generator_v2_spline_cvae_support_proxy()
|
|
|
|
| 29 |
GENERATOR_V2_MEMORY_EVAL = RESULTS_DIR / "generator_v2_positive_tangent_memory_eval.json"
|
| 30 |
GENERATOR_V2_LOCAL_ATLAS_EVAL = RESULTS_DIR / "generator_v2_positive_tangent_local_atlas_pool16_eval.json"
|
| 31 |
GENERATOR_V2_LOCAL_ATLAS_SWEEP = RESULTS_DIR / "generator_v2_positive_tangent_local_atlas_sweep_summary.json"
|
| 32 |
+
GENERATOR_V2_CHART_SYNTHESIS_EVAL = RESULTS_DIR / "generator_v2_positive_tangent_chart_synthesis_eval.json"
|
| 33 |
+
GENERATOR_V2_CHART_SYNTHESIS_SWEEP = RESULTS_DIR / "generator_v2_positive_tangent_chart_synthesis_sweep_summary.json"
|
| 34 |
GENERATOR_V2_CVAE_EVAL = RESULTS_DIR / "generator_v2_positive_tangent_cvae_eval.json"
|
| 35 |
GENERATOR_V2_CVAE_SWEEP = RESULTS_DIR / "generator_v2_positive_tangent_cvae_sweep_summary.json"
|
| 36 |
GENERATOR_V2_SPLINE_CVAE_EVAL = RESULTS_DIR / "generator_v2_positive_tangent_spline_cvae_eval.json"
|
|
|
|
| 1891 |
}
|
| 1892 |
|
| 1893 |
|
| 1894 |
+
def _load_generator_v2_chart_synthesis_support_proxy() -> dict[str, Any]:
|
| 1895 |
+
source = GENERATOR_V2_CHART_SYNTHESIS_EVAL
|
| 1896 |
+
sweep_best: dict[str, Any] | None = None
|
| 1897 |
+
if GENERATOR_V2_CHART_SYNTHESIS_SWEEP.exists():
|
| 1898 |
+
sweep = _load_json(GENERATOR_V2_CHART_SYNTHESIS_SWEEP)
|
| 1899 |
+
if sweep.get("best", {}).get("path"):
|
| 1900 |
+
candidate = Path(str(sweep["best"]["path"]))
|
| 1901 |
+
if candidate.exists():
|
| 1902 |
+
source = candidate
|
| 1903 |
+
sweep_best = sweep["best"]
|
| 1904 |
+
if not source.exists():
|
| 1905 |
+
return {"missing": True, "source": str(source)}
|
| 1906 |
+
data = _load_json(source)
|
| 1907 |
+
return {
|
| 1908 |
+
"missing": False,
|
| 1909 |
+
"source": str(source),
|
| 1910 |
+
"sweep_summary": str(GENERATOR_V2_CHART_SYNTHESIS_SWEEP)
|
| 1911 |
+
if GENERATOR_V2_CHART_SYNTHESIS_SWEEP.exists()
|
| 1912 |
+
else None,
|
| 1913 |
+
"sweep_best": sweep_best,
|
| 1914 |
+
"report_type": data.get("report_type"),
|
| 1915 |
+
"metric_scope": data.get("metric_scope"),
|
| 1916 |
+
"note": data.get("note"),
|
| 1917 |
+
"targets": data.get("targets"),
|
| 1918 |
+
"config": data.get("config", {}),
|
| 1919 |
+
"code_dim": data.get("code_dim"),
|
| 1920 |
+
"horizon": data.get("horizon"),
|
| 1921 |
+
"action_dim": data.get("action_dim"),
|
| 1922 |
+
"num_examples": data.get("num_examples"),
|
| 1923 |
+
"num_groups": data.get("num_groups"),
|
| 1924 |
+
"num_train_examples": data.get("num_train_examples"),
|
| 1925 |
+
"num_val_examples": data.get("num_val_examples"),
|
| 1926 |
+
"num_train_positive": data.get("num_train_positive"),
|
| 1927 |
+
"num_val_groups_with_positive": data.get("num_val_groups_with_positive"),
|
| 1928 |
+
"label_counts": data.get("label_counts", {}),
|
| 1929 |
+
"train_positive_by_task": data.get("train_positive_by_task", {}),
|
| 1930 |
+
"overall": data.get("overall", {}),
|
| 1931 |
+
"per_task": data.get("per_task", {}),
|
| 1932 |
+
}
|
| 1933 |
+
|
| 1934 |
+
|
| 1935 |
def _load_generator_v2_cvae_support_proxy() -> dict[str, Any]:
|
| 1936 |
source = GENERATOR_V2_CVAE_EVAL
|
| 1937 |
sweep_best: dict[str, Any] | None = None
|
|
|
|
| 2396 |
)
|
| 2397 |
support_proxy = report.get("generator_v2_support_proxy", {})
|
| 2398 |
local_atlas_proxy = report.get("generator_v2_local_atlas_support_proxy", {})
|
| 2399 |
+
chart_synthesis_proxy = report.get("generator_v2_chart_synthesis_support_proxy", {})
|
| 2400 |
cvae_proxy = report.get("generator_v2_cvae_support_proxy", {})
|
| 2401 |
spline_proxy = report.get("generator_v2_spline_cvae_support_proxy", {})
|
| 2402 |
flow_proxy = report.get("generator_v2_spline_flow_support_proxy", {})
|
|
|
|
| 2483 |
"|---|---:|---:|---:|---:|---:|",
|
| 2484 |
_generator_support_compare_row("memory", support_proxy),
|
| 2485 |
_generator_support_compare_row("local-atlas", local_atlas_proxy),
|
| 2486 |
+
_generator_support_compare_row("chart-synthesis", chart_synthesis_proxy),
|
| 2487 |
_generator_support_compare_row("raw-cvae", cvae_proxy),
|
| 2488 |
_generator_support_compare_row("spline-cvae", spline_proxy),
|
| 2489 |
_generator_support_compare_row("spline-flow", flow_proxy),
|
|
|
|
| 2623 |
"generator_v2_local_atlas_support_proxy": (
|
| 2624 |
_load_generator_v2_local_atlas_support_proxy()
|
| 2625 |
),
|
| 2626 |
+
"generator_v2_chart_synthesis_support_proxy": (
|
| 2627 |
+
_load_generator_v2_chart_synthesis_support_proxy()
|
| 2628 |
+
),
|
| 2629 |
"generator_v2_cvae_support_proxy": _load_generator_v2_cvae_support_proxy(),
|
| 2630 |
"generator_v2_spline_cvae_support_proxy": (
|
| 2631 |
_load_generator_v2_spline_cvae_support_proxy()
|