Gate real train curve evidence

This commit is contained in:
2026-06-30 23:47:57 +08:00
parent 6b3a3d7c6d
commit f77ba2888c
4 changed files with 16 additions and 1 deletions

View File

@@ -30,6 +30,7 @@ def evaluate_project() -> dict:
backend = settings.project_root / "backend" / "app" / "main.py"
jobs_backend = settings.project_root / "backend" / "app" / "jobs.py"
readme = settings.project_root / "README.md"
results_service = settings.project_root / "backend" / "app" / "modules" / "results" / "service.py"
catalog = get_catalog()
coverage = get_coverage_report()
checks = []
@@ -39,6 +40,7 @@ def evaluate_project() -> dict:
backend_text = backend.read_text(encoding="utf-8") if backend.exists() else ""
jobs_text = jobs_backend.read_text(encoding="utf-8") if jobs_backend.exists() else ""
acceptance_text = (settings.project_root / "backend" / "app" / "acceptance.py").read_text(encoding="utf-8")
results_service_text = results_service.read_text(encoding="utf-8") if results_service.exists() else ""
readme_text = readme.read_text(encoding="utf-8") if readme.exists() else ""
expectations = {
@@ -119,6 +121,9 @@ def evaluate_project() -> dict:
and "best_weight" in frontend_text
and "results_csv" in frontend_text
and "heatmap_outputs" in frontend_text,
"single_epoch_curve_support": "if points:" in results_service_text
and "scaled.length === 1" in frontend_text
and "<circle" in frontend_text,
"agent_api": "/api/agents/evaluate" in backend_text and "/api/agents/validate" in backend_text,
"agent_panel_ui": "runAgentValidation" in frontend_text and "评价建议" in frontend_text and "Validation Agent" in frontend_text,
"coverage_api": "/api/coverage" in backend_text and coverage["task_build_passed"],
@@ -143,7 +148,7 @@ def evaluate_project() -> dict:
if coverage["unmapped_user_scripts"]:
suggestions.append(f"Map remaining user-facing scripts: {len(coverage['unmapped_user_scripts'])}")
if not suggestions:
suggestions.append("Current platform covers the requested control-plane features, uploaded YOLO dataset train/predict/heatmap actions, live uploaded-data YOLO predict/heatmap acceptance, real workspace data acceptance, real short-train acceptance with artifact links, and synthetic deep training acceptance; next focus is a longer operator-run task on a full dataset.")
suggestions.append("Current platform covers the requested control-plane features, uploaded YOLO dataset train/predict/heatmap actions, live uploaded-data YOLO predict/heatmap acceptance, real workspace data acceptance, real short-train acceptance with artifact links and single-epoch curves, and synthetic deep training acceptance; next focus is a longer operator-run task on a full dataset.")
passed_count = sum(1 for item in checks if item["passed"])
total_count = max(len(checks), 1)