mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-23 12:40:08 +00:00
feat(profiling): profile groot, xvla, diffusion, wall_x on PRs
Add groot, xvla, diffusion and wall_x (wall-oss-flow) to the smoke profiling filter and switch the runner to per-policy dependency resolution. Each policy now gets its own `uv sync --extra <policy>` pass followed by a profiling run, so heavy or conflicting extras (flash-attn, peft, diffusers, etc.) can never block another policy's profiling. A failure in one policy is logged and surfaces a non-zero exit at the end instead of aborting the matrix. Made-with: Cursor
This commit is contained in:
@@ -80,7 +80,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
HF_USER_TOKEN: ${{ secrets.LEROBOT_HF_USER }}
|
HF_USER_TOKEN: ${{ secrets.LEROBOT_HF_USER }}
|
||||||
PROFILE_MODE: ${{ github.event_name == 'pull_request' && 'summary' || github.event.inputs.profile_mode || 'trace' }}
|
PROFILE_MODE: ${{ github.event_name == 'pull_request' && 'summary' || github.event.inputs.profile_mode || 'trace' }}
|
||||||
POLICY_FILTER: ${{ github.event_name == 'pull_request' && 'act,pi0,pi05,smolvla' || github.event.inputs.policies || '' }}
|
POLICY_FILTER: ${{ github.event_name == 'pull_request' && 'act,diffusion,pi0,pi05,smolvla,groot,xvla,wall_x' || github.event.inputs.policies || '' }}
|
||||||
RESULTS_REPO: ${{ github.event.inputs.results_repo || 'model-profiling-history' }}
|
RESULTS_REPO: ${{ github.event.inputs.results_repo || 'model-profiling-history' }}
|
||||||
SHOULD_PUBLISH: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.publish_results == 'true') }}
|
SHOULD_PUBLISH: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.publish_results == 'true') }}
|
||||||
steps:
|
steps:
|
||||||
@@ -137,62 +137,52 @@ jobs:
|
|||||||
hf auth login --token "${HF_USER_TOKEN}" --add-to-git-credential 2>/dev/null || true
|
hf auth login --token "${HF_USER_TOKEN}" --add-to-git-credential 2>/dev/null || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
policies_for_install=()
|
policies_to_run=()
|
||||||
if [[ -n "${POLICY_FILTER}" ]]; then
|
if [[ -n "${POLICY_FILTER}" ]]; then
|
||||||
IFS="," read -ra policies_for_install <<< "${POLICY_FILTER}"
|
IFS="," read -ra policies_to_run <<< "${POLICY_FILTER}"
|
||||||
else
|
else
|
||||||
policies_for_install=(act diffusion groot multi_task_dit pi0 pi0_fast pi05 smolvla wall_x xvla)
|
policies_to_run=(act diffusion groot multi_task_dit pi0 pi0_fast pi05 smolvla wall_x xvla)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
extras=(training test)
|
policy_extras() {
|
||||||
add_extra() {
|
case "$1" in
|
||||||
local extra="$1"
|
act) ;;
|
||||||
for existing in "${extras[@]}"; do
|
diffusion) echo "diffusion" ;;
|
||||||
if [[ "${existing}" == "${extra}" ]]; then
|
groot) echo "groot" ;;
|
||||||
return
|
multi_task_dit) echo "multi_task_dit" ;;
|
||||||
fi
|
pi0|pi0_fast|pi05) echo "pi" ;;
|
||||||
done
|
smolvla) echo "smolvla" ;;
|
||||||
extras+=("${extra}")
|
wall_x) echo "wallx" ;;
|
||||||
}
|
xvla) echo "xvla" ;;
|
||||||
|
|
||||||
for policy in "${policies_for_install[@]}"; do
|
|
||||||
policy="$(echo "${policy}" | xargs)"
|
|
||||||
case "${policy}" in
|
|
||||||
act)
|
|
||||||
;;
|
|
||||||
diffusion)
|
|
||||||
add_extra diffusion
|
|
||||||
;;
|
|
||||||
groot)
|
|
||||||
add_extra groot
|
|
||||||
;;
|
|
||||||
multi_task_dit)
|
|
||||||
add_extra multi_task_dit
|
|
||||||
;;
|
|
||||||
pi0|pi0_fast|pi05)
|
|
||||||
add_extra pi
|
|
||||||
;;
|
|
||||||
smolvla)
|
|
||||||
add_extra smolvla
|
|
||||||
;;
|
|
||||||
wall_x)
|
|
||||||
add_extra wallx
|
|
||||||
;;
|
|
||||||
xvla)
|
|
||||||
add_extra xvla
|
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
echo "Unknown profiling policy ${policy}" >&2
|
echo "Unknown profiling policy $1" >&2
|
||||||
exit 1
|
return 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
}
|
||||||
|
|
||||||
sync_cmd=(uv sync --locked)
|
overall_status=0
|
||||||
for extra in "${extras[@]}"; do
|
for raw_policy in "${policies_to_run[@]}"; do
|
||||||
|
policy="$(echo "${raw_policy}" | xargs)"
|
||||||
|
[[ -z "${policy}" ]] && continue
|
||||||
|
|
||||||
|
echo "::group::Profile ${policy}"
|
||||||
|
|
||||||
|
extra="$(policy_extras "${policy}")" || { overall_status=1; echo "::endgroup::"; continue; }
|
||||||
|
|
||||||
|
# Fresh, isolated dependency resolution per policy so that
|
||||||
|
# incompatible extras (e.g. flash-attn for groot) never block
|
||||||
|
# the rest of the matrix.
|
||||||
|
sync_cmd=(uv sync --locked --extra training --extra test)
|
||||||
|
if [[ -n "${extra}" ]]; then
|
||||||
sync_cmd+=(--extra "${extra}")
|
sync_cmd+=(--extra "${extra}")
|
||||||
done
|
fi
|
||||||
"${sync_cmd[@]}"
|
if ! "${sync_cmd[@]}"; then
|
||||||
|
echo "Dependency install failed for ${policy}; skipping." >&2
|
||||||
|
overall_status=1
|
||||||
|
echo "::endgroup::"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
cmd=(
|
cmd=(
|
||||||
uv run python scripts/ci/run_model_profiling.py
|
uv run python scripts/ci/run_model_profiling.py
|
||||||
@@ -203,24 +193,21 @@ jobs:
|
|||||||
--git_commit="${HOST_GIT_COMMIT}"
|
--git_commit="${HOST_GIT_COMMIT}"
|
||||||
--git_ref="${PROFILE_GIT_REF}"
|
--git_ref="${PROFILE_GIT_REF}"
|
||||||
--pr_number="${PROFILE_PR_NUMBER}"
|
--pr_number="${PROFILE_PR_NUMBER}"
|
||||||
|
--policies "${policy}"
|
||||||
)
|
)
|
||||||
|
|
||||||
if [[ -n "${POLICY_FILTER}" ]]; then
|
|
||||||
IFS="," read -ra policies <<< "${POLICY_FILTER}"
|
|
||||||
cmd+=(--policies)
|
|
||||||
for policy in "${policies[@]}"; do
|
|
||||||
policy="$(echo "${policy}" | xargs)"
|
|
||||||
if [[ -n "${policy}" ]]; then
|
|
||||||
cmd+=("${policy}")
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "${SHOULD_PUBLISH}" == "true" && -n "${HF_USER_TOKEN:-}" ]]; then
|
if [[ "${SHOULD_PUBLISH}" == "true" && -n "${HF_USER_TOKEN:-}" ]]; then
|
||||||
cmd+=(--publish)
|
cmd+=(--publish)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"${cmd[@]}"
|
if ! "${cmd[@]}"; then
|
||||||
|
echo "Profiling failed for ${policy}." >&2
|
||||||
|
overall_status=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "::endgroup::"
|
||||||
|
done
|
||||||
|
|
||||||
|
exit "${overall_status}"
|
||||||
'
|
'
|
||||||
|
|
||||||
- name: Upload profiling artifacts
|
- name: Upload profiling artifacts
|
||||||
|
|||||||
Reference in New Issue
Block a user