Enable dedicated MMSeg full mmcv runtime
This commit is contained in:
@@ -55,21 +55,36 @@ def validate_project(run_build: bool = False) -> dict:
|
||||
checks.append({"name": "weights_manifest_present", "passed": manifest.get("count", 0) >= 1})
|
||||
checks.append({"name": "gpus_query", "passed": bool(get_gpus().get("available"))})
|
||||
env_names = [item["name"] for item in get_conda_envs().get("envs", [])]
|
||||
checks.append({"name": "seg_smp_env_exists", "passed": "seg_smp" in env_names})
|
||||
checks.append({"name": "task_env_exists", "passed": settings.task_conda_env in env_names, "detail": {"env": settings.task_conda_env}})
|
||||
checks.append({"name": "mmseg_env_exists", "passed": settings.mmseg_conda_env in env_names, "detail": {"env": settings.mmseg_conda_env}})
|
||||
|
||||
smoke = _run(
|
||||
[
|
||||
"conda",
|
||||
"run",
|
||||
"-n",
|
||||
"seg_smp",
|
||||
settings.task_conda_env,
|
||||
"python",
|
||||
"-c",
|
||||
"import fastapi, uvicorn, torch, cv2, segmentation_models_pytorch, ultralytics, albumentations, mmengine, mmseg, mmcv; print(torch.__version__, torch.cuda.is_available())",
|
||||
],
|
||||
cwd=settings.project_root,
|
||||
)
|
||||
checks.append({"name": "seg_smp_backend_smoke", "passed": smoke["passed"], "detail": smoke})
|
||||
checks.append({"name": "task_env_backend_smoke", "passed": smoke["passed"], "detail": smoke})
|
||||
|
||||
mmseg_smoke = _run(
|
||||
[
|
||||
"conda",
|
||||
"run",
|
||||
"-n",
|
||||
settings.mmseg_conda_env,
|
||||
"python",
|
||||
"-c",
|
||||
"import torch, cv2, mmcv, mmengine, mmseg; import mmcv._ext; print(torch.__version__, torch.version.cuda, cv2.__version__, mmcv.__version__, mmseg.__version__)",
|
||||
],
|
||||
cwd=settings.project_root,
|
||||
)
|
||||
checks.append({"name": "mmseg_env_full_mmcv_smoke", "passed": mmseg_smoke["passed"], "detail": mmseg_smoke})
|
||||
|
||||
no_weight = _run(["bash", "scripts/check_no_weight_git.sh"], cwd=settings.project_root)
|
||||
checks.append({"name": "no_weight_in_git", "passed": no_weight["passed"], "detail": no_weight})
|
||||
|
||||
Reference in New Issue
Block a user