Files

19 lines
758 B
Python

from __future__ import annotations
from ...commands import CommandSpec, append_flag, conda_python
from ...config import settings
ANALYSIS_DIR = settings.source_root / "Seg_All_In_One_Analysis"
def build_analysis_task(job_type: str, params: dict, conda_env: str) -> CommandSpec | None:
if job_type != "analysis.all":
return None
args = conda_python(conda_env, ANALYSIS_DIR / "1_Analysis_All.py")
append_flag(args, "--input_dir", params.get("input_dir", "../BestMode_Predict_Results_DataSet_Public"))
append_flag(args, "--output_dir", params.get("output_dir", "./"))
stdin = f"{params.get('dataset_choice', 1)}\n"
return CommandSpec(args, ANALYSIS_DIR, "merge SegModel/MMSeg metrics and generate plots", stdin_text=stdin)