Add real YOLO train acceptance

This commit is contained in:
2026-06-30 23:33:43 +08:00
parent 5055084788
commit fb96c96d8b
10 changed files with 270 additions and 16 deletions

View File

@@ -108,6 +108,12 @@ def evaluate_project() -> dict:
and "real_workspace_yolo_predict_job_runner" in acceptance_text
and "real_workspace_yolo_heatmap_job_runner" in acceptance_text
and "real_workspace_stack_job_runner" in acceptance_text,
"real_train_acceptance": "/api/acceptance/real-train" in backend_text
and "runRealTrainAcceptance" in frontend_text
and "真实短训" in frontend_text
and "real_train_yolo_one_epoch_job_runner" in acceptance_text
and "real_train_trained_weight_predict_job_runner" in acceptance_text
and "real_train_trained_weight_heatmap_job_runner" in acceptance_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"],
@@ -132,7 +138,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, 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, 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)

View File

@@ -8,7 +8,7 @@ import urllib.error
import urllib.request
from pathlib import Path
from ..acceptance import run_deep_acceptance, run_live_acceptance, run_real_dataset_acceptance
from ..acceptance import run_deep_acceptance, run_live_acceptance, run_real_dataset_acceptance, run_real_train_acceptance
from ..capabilities import get_capability_matrix
from ..catalog import get_catalog
from ..config import settings
@@ -47,6 +47,7 @@ def validate_project(
run_acceptance: bool | None = None,
run_deep: bool | None = None,
run_real: bool | None = None,
run_real_train: bool | None = None,
run_live: bool | None = None,
) -> dict:
"""Validate current runtime readiness without launching heavy training."""
@@ -122,8 +123,9 @@ def validate_project(
acceptance_enabled = run_acceptance if run_acceptance is not None else os.getenv("SEG_VALIDATE_ACCEPTANCE", "0") == "1"
deep_enabled = run_deep if run_deep is not None else os.getenv("SEG_VALIDATE_DEEP", "1") == "1"
real_enabled = run_real if run_real is not None else os.getenv("SEG_VALIDATE_REAL", "0") == "1"
real_train_enabled = run_real_train if run_real_train is not None else os.getenv("SEG_VALIDATE_REAL_TRAIN", "0") == "1"
live_enabled = run_live if run_live is not None else os.getenv("SEG_VALIDATE_LIVE", "0") == "1"
live_enabled = live_enabled or acceptance_enabled or real_enabled
live_enabled = live_enabled or acceptance_enabled or real_enabled or real_train_enabled
if live_enabled:
backend_url = os.getenv("SEG_VALIDATE_BACKEND_URL", "http://127.0.0.1:8010")
@@ -166,6 +168,9 @@ def validate_project(
if real_enabled:
real_acceptance = run_real_dataset_acceptance(backend_url)
checks.append({"name": "real_workspace_acceptance", "passed": real_acceptance["passed"], "detail": real_acceptance})
if real_train_enabled:
real_train_acceptance = run_real_train_acceptance(backend_url)
checks.append({"name": "real_train_acceptance", "passed": real_train_acceptance["passed"], "detail": real_train_acceptance})
if deep_enabled:
deep_acceptance = run_deep_acceptance()
checks.append({"name": "deep_training_acceptance", "passed": deep_acceptance["passed"], "detail": deep_acceptance})