Gate real train curve evidence
This commit is contained in:
@@ -30,6 +30,7 @@ def evaluate_project() -> dict:
|
|||||||
backend = settings.project_root / "backend" / "app" / "main.py"
|
backend = settings.project_root / "backend" / "app" / "main.py"
|
||||||
jobs_backend = settings.project_root / "backend" / "app" / "jobs.py"
|
jobs_backend = settings.project_root / "backend" / "app" / "jobs.py"
|
||||||
readme = settings.project_root / "README.md"
|
readme = settings.project_root / "README.md"
|
||||||
|
results_service = settings.project_root / "backend" / "app" / "modules" / "results" / "service.py"
|
||||||
catalog = get_catalog()
|
catalog = get_catalog()
|
||||||
coverage = get_coverage_report()
|
coverage = get_coverage_report()
|
||||||
checks = []
|
checks = []
|
||||||
@@ -39,6 +40,7 @@ def evaluate_project() -> dict:
|
|||||||
backend_text = backend.read_text(encoding="utf-8") if backend.exists() else ""
|
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 ""
|
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")
|
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 ""
|
readme_text = readme.read_text(encoding="utf-8") if readme.exists() else ""
|
||||||
|
|
||||||
expectations = {
|
expectations = {
|
||||||
@@ -119,6 +121,9 @@ def evaluate_project() -> dict:
|
|||||||
and "best_weight" in frontend_text
|
and "best_weight" in frontend_text
|
||||||
and "results_csv" in frontend_text
|
and "results_csv" in frontend_text
|
||||||
and "heatmap_outputs" 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_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,
|
"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"],
|
"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"]:
|
if coverage["unmapped_user_scripts"]:
|
||||||
suggestions.append(f"Map remaining user-facing scripts: {len(coverage['unmapped_user_scripts'])}")
|
suggestions.append(f"Map remaining user-facing scripts: {len(coverage['unmapped_user_scripts'])}")
|
||||||
if not suggestions:
|
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"])
|
passed_count = sum(1 for item in checks if item["passed"])
|
||||||
total_count = max(len(checks), 1)
|
total_count = max(len(checks), 1)
|
||||||
|
|||||||
@@ -168,6 +168,7 @@ def get_capability_matrix() -> dict[str, Any]:
|
|||||||
all_tasks = catalog["task_types"]
|
all_tasks = catalog["task_types"]
|
||||||
buildable_tasks = _coverage_build_task_set(coverage)
|
buildable_tasks = _coverage_build_task_set(coverage)
|
||||||
runtime_by_role = _runtime_map(readiness)
|
runtime_by_role = _runtime_map(readiness)
|
||||||
|
real_train_curves = [item for item in curves if "real_train_acceptance" in item.get("relative_path", "")]
|
||||||
domains = []
|
domains = []
|
||||||
|
|
||||||
for group in CAPABILITY_GROUPS:
|
for group in CAPABILITY_GROUPS:
|
||||||
@@ -271,6 +272,12 @@ def get_capability_matrix() -> dict[str, Any]:
|
|||||||
"passed": len(curves) >= 1,
|
"passed": len(curves) >= 1,
|
||||||
"detail": f"{len(curves)} curve file(s)",
|
"detail": f"{len(curves)} curve file(s)",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "real_train_curve",
|
||||||
|
"label": "真实短训 loss 曲线",
|
||||||
|
"passed": len(real_train_curves) >= 1,
|
||||||
|
"detail": f"{len(real_train_curves)} real train curve file(s)",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "deep_acceptance",
|
"id": "deep_acceptance",
|
||||||
"label": "深度训练验收",
|
"label": "深度训练验收",
|
||||||
@@ -310,6 +317,7 @@ def get_capability_matrix() -> dict[str, Any]:
|
|||||||
"uploaded_datasets": len(datasets),
|
"uploaded_datasets": len(datasets),
|
||||||
"artifacts": len(results),
|
"artifacts": len(results),
|
||||||
"curves": len(curves),
|
"curves": len(curves),
|
||||||
|
"real_train_curves": len(real_train_curves),
|
||||||
"weights": manifest.get("count", 0),
|
"weights": manifest.get("count", 0),
|
||||||
"gpus_available": bool(gpus.get("available")),
|
"gpus_available": bool(gpus.get("available")),
|
||||||
"acceptance_passed": bool(acceptance.get("passed")),
|
"acceptance_passed": bool(acceptance.get("passed")),
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ def test_evaluation_agent_returns_checks():
|
|||||||
checks = {item["name"]: item["passed"] for item in result["checks"]}
|
checks = {item["name"]: item["passed"] for item in result["checks"]}
|
||||||
assert checks["real_workspace_acceptance"] is True
|
assert checks["real_workspace_acceptance"] is True
|
||||||
assert checks["real_train_acceptance"] is True
|
assert checks["real_train_acceptance"] is True
|
||||||
|
assert checks["single_epoch_curve_support"] is True
|
||||||
|
|
||||||
|
|
||||||
def test_validation_agent_lightweight(monkeypatch):
|
def test_validation_agent_lightweight(monkeypatch):
|
||||||
|
|||||||
@@ -19,5 +19,6 @@ def test_capability_matrix_tracks_user_requirements():
|
|||||||
assert requirements["runtime_readiness"]["passed"] is True
|
assert requirements["runtime_readiness"]["passed"] is True
|
||||||
assert requirements["yolo_heatmap"]["passed"] is True
|
assert requirements["yolo_heatmap"]["passed"] is True
|
||||||
assert requirements["training_curves"]["passed"] is True
|
assert requirements["training_curves"]["passed"] is True
|
||||||
|
assert requirements["real_train_curve"]["passed"] is True
|
||||||
assert requirements["real_workspace_acceptance"]["passed"] is True
|
assert requirements["real_workspace_acceptance"]["passed"] is True
|
||||||
assert requirements["real_train_acceptance"]["passed"] is True
|
assert requirements["real_train_acceptance"]["passed"] is True
|
||||||
|
|||||||
Reference in New Issue
Block a user