video_backbone剖析
This commit is contained in:
@@ -7,6 +7,22 @@ cd "${repo_root}"
|
||||
|
||||
run_analysis="${RUN_ANALYSIS:-1}"
|
||||
case_filter="${CASE_FILTER:-}"
|
||||
python_bin="${PYTHON_BIN:-}"
|
||||
|
||||
if [[ -z "${python_bin}" ]]; then
|
||||
if [[ -n "${CONDA_PREFIX:-}" ]] && [[ -x "${CONDA_PREFIX}/bin/python" ]]; then
|
||||
python_bin="${CONDA_PREFIX}/bin/python"
|
||||
elif [[ -n "${VIRTUAL_ENV:-}" ]] && [[ -x "${VIRTUAL_ENV}/bin/python" ]]; then
|
||||
python_bin="${VIRTUAL_ENV}/bin/python"
|
||||
else
|
||||
python_bin="$(command -v python || true)"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z "${python_bin}" ]] || [[ ! -x "${python_bin}" ]]; then
|
||||
echo "Unable to resolve a usable Python interpreter. Set PYTHON_BIN explicitly." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case_scripts=(
|
||||
"unitree_z1_stackbox/case1/run_world_model_interaction.sh"
|
||||
@@ -36,23 +52,9 @@ for case_script in "${case_scripts[@]}"; do
|
||||
continue
|
||||
fi
|
||||
|
||||
case_dir="$(dirname "${case_script}")"
|
||||
inference_dir="${repo_root}/${case_dir}/output/inference"
|
||||
|
||||
echo "============================================================"
|
||||
echo "Running ${case_script}"
|
||||
echo "============================================================"
|
||||
bash "${repo_root}/${case_script}"
|
||||
|
||||
if [[ "${run_analysis}" == "1" ]]; then
|
||||
if [[ -f "${inference_dir}/stepwise_log.csv" ]] && \
|
||||
[[ -f "${inference_dir}/sample_summary.csv" ]] && \
|
||||
[[ -f "${inference_dir}/round_summary.csv" ]]; then
|
||||
echo "Analyzing ${case_dir}"
|
||||
python3 "${repo_root}/scripts/evaluation/analyze_metrics.py" \
|
||||
--input_dir "${inference_dir}"
|
||||
else
|
||||
echo "Skipping analysis for ${case_dir}: missing analysis CSVs."
|
||||
fi
|
||||
fi
|
||||
echo "Using Python: ${python_bin}"
|
||||
RUN_ANALYSIS="${run_analysis}" PYTHON_BIN="${python_bin}" bash "${repo_root}/${case_script}"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user