Expand Seg task coverage and coverage dashboard

This commit is contained in:
2026-06-30 12:54:25 +08:00
parent dd7b7384ec
commit 7a43303f15
18 changed files with 849 additions and 28 deletions

View File

@@ -4,16 +4,21 @@ from pathlib import Path
from ..catalog import get_catalog
from ..config import settings
from ..coverage import get_coverage_report
REQUIRED_TASKS = {
"dataset.upload": "covered_by_api",
"dataset.video_frames": "job",
"dataset.yolo_txt_sort": "job",
"segmodel.train": "job",
"segmodel.predict": "job",
"yolo.heatmap": "job",
"yolo.video_visible": "job",
"mmseg.flops_fps": "job",
"analysis.all": "job",
"visual.fps": "job",
"system.check_graph_card": "job",
}
@@ -23,6 +28,7 @@ def evaluate_project() -> dict:
backend = settings.project_root / "backend" / "app" / "main.py"
readme = settings.project_root / "README.md"
catalog = get_catalog()
coverage = get_coverage_report()
checks = []
suggestions = []
@@ -35,8 +41,12 @@ def evaluate_project() -> dict:
"upload_ui": "uploadDatasetFiles" in frontend_text and "labels" in frontend_text and "masks" in frontend_text,
"loss_result_ui": "loss" in frontend_text.lower() and "heatmap" in frontend_text.lower(),
"dataset_api": "/api/datasets" in backend_text and "api_upload_dataset_files" in backend_text,
"coverage_api": "/api/coverage" in backend_text and coverage["task_build_passed"],
"visual_tools": "visual.yolo11_heatmap_v2" in catalog["task_types"] and "visual.fps" in catalog["task_types"],
"yolo_dataset_tools": "dataset.yolo_txt_sort" in catalog["task_types"] and "dataset.yolo_resize" in catalog["task_types"],
"no_weight_to_gitea": "Do not push" in readme_text and "check_no_weight_git" in readme_text,
"all_core_tasks": all(task in catalog["task_types"] for task in REQUIRED_TASKS if REQUIRED_TASKS[task] == "job"),
"mapped_user_scripts": not coverage["unmapped_user_scripts"],
}
for name, passed in expectations.items():
@@ -48,6 +58,8 @@ def evaluate_project() -> dict:
suggestions.append("MMSeg algorithm catalog should expose all 31 algorithm generators.")
if len(catalog["segmodel_architectures"]) < 12:
suggestions.append("SegModel catalog should expose all 12 supported architectures.")
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; next focus is real dataset/training acceptance tests.")
@@ -58,4 +70,3 @@ def evaluate_project() -> dict:
"checks": checks,
"suggestions": suggestions,
}