diff --git a/backend/app/agents/evaluation_agent.py b/backend/app/agents/evaluation_agent.py index 2701687..cc0328f 100644 --- a/backend/app/agents/evaluation_agent.py +++ b/backend/app/agents/evaluation_agent.py @@ -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 " 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) diff --git a/backend/app/capabilities.py b/backend/app/capabilities.py index f578c62..11173ad 100644 --- a/backend/app/capabilities.py +++ b/backend/app/capabilities.py @@ -168,6 +168,7 @@ def get_capability_matrix() -> dict[str, Any]: all_tasks = catalog["task_types"] buildable_tasks = _coverage_build_task_set(coverage) runtime_by_role = _runtime_map(readiness) + real_train_curves = [item for item in curves if "real_train_acceptance" in item.get("relative_path", "")] domains = [] for group in CAPABILITY_GROUPS: @@ -271,6 +272,12 @@ def get_capability_matrix() -> dict[str, Any]: "passed": len(curves) >= 1, "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", "label": "深度训练验收", @@ -310,6 +317,7 @@ def get_capability_matrix() -> dict[str, Any]: "uploaded_datasets": len(datasets), "artifacts": len(results), "curves": len(curves), + "real_train_curves": len(real_train_curves), "weights": manifest.get("count", 0), "gpus_available": bool(gpus.get("available")), "acceptance_passed": bool(acceptance.get("passed")), diff --git a/backend/tests/test_agents.py b/backend/tests/test_agents.py index 4e678c9..df271bd 100644 --- a/backend/tests/test_agents.py +++ b/backend/tests/test_agents.py @@ -11,6 +11,7 @@ def test_evaluation_agent_returns_checks(): checks = {item["name"]: item["passed"] for item in result["checks"]} assert checks["real_workspace_acceptance"] is True assert checks["real_train_acceptance"] is True + assert checks["single_epoch_curve_support"] is True def test_validation_agent_lightweight(monkeypatch): diff --git a/backend/tests/test_capabilities.py b/backend/tests/test_capabilities.py index 98c2185..17c051f 100644 --- a/backend/tests/test_capabilities.py +++ b/backend/tests/test_capabilities.py @@ -19,5 +19,6 @@ def test_capability_matrix_tracks_user_requirements(): assert requirements["runtime_readiness"]["passed"] is True assert requirements["yolo_heatmap"]["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_train_acceptance"]["passed"] is True