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

@@ -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})