Repository navigation
refactor(ansible): drive the model downloads with one loop task - #7268
Merged
xmfcx merged 1 commit intoAug 14, 2026
Merged
Conversation
Contributor
|
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
xmfcx
force-pushed
the
refactor/artifacts-download-loop
branch
from
August 14, 2026 07:32
6699f8f to
52d47ac
Compare
All 20 hf download tasks in the artifacts role were identical except for
the repository, the tag and the local directory. One task now loops over
a table of {repo, revision, dest}, with dest defaulting to the
repository name. The load-bearing comments stay on the table rows.
The 20 rendered commands, the environment and the destinations are
unchanged. One behavior changes: a failed download no longer stops the
bundles after it. Ansible runs every loop item, then reports the task as
failed, so the play still stops at the task.
Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
xmfcx
force-pushed
the
refactor/artifacts-download-loop
branch
from
August 14, 2026 07:57
52d47ac to
0172f18
Compare
xmfcx
marked this pull request as ready for review
August 14, 2026 08:01
xmfcx
requested review from
isamu-takagi,
mitsudome-r,
oguzkaganozt and
youtalk
as code owners
August 14, 2026 08:01
mitsudome-r
approved these changes
Aug 14, 2026
|
Tick the box to add this pull request to the merge queue (same as
|
This was referenced Aug 14, 2026
TomcoGame
pushed a commit
to TomcoGame/Autoware-Assurance-Stack
that referenced
this pull request
Oct 25, 2026
…warefoundation#7268) All 20 hf download tasks in the artifacts role were identical except for the repository, the tag and the local directory. One task now loops over a table of {repo, revision, dest}, with dest defaulting to the repository name. The load-bearing comments stay on the table rows. The 20 rendered commands, the environment and the destinations are unchanged. One behavior changes: a failed download no longer stops the bundles after it. Ansible runs every loop item, then reports the task as failed, so the play still stops at the task. Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
All 20
hf downloadtasks in the artifacts role were identical except for the repository, the tag and the local directory. One task now loops over a table of{repo, revision, dest}.destis relative todata_dirand defaults to the repository name.Five rows set
dest. The fourdiffusion_plannertags each hold the same filenames at the repository root, so they need separate directories or they overwrite each other.tensorrt_vadgoes tovad/v0.1, because the node reads$(var data_path)/vad/v0.1.The 20 rendered commands, the environment and the destinations are byte-identical to the tasks they replace. The load-bearing comments stay on the table rows.
loop_control: labelkeeps the play output at one line per bundle, labeled<repo> <revision>.One behavior changes. A failed download no longer stops the bundles after it. Ansible runs every loop item, then reports the task as failed, so the play still stops at the task. A user with one bad tag keeps the other bundles, and a failing CI job spends the full remaining download time before it ends.
PIPX_BIN_DIRfix (Honor PIPX_BIN_DIR when locating the hf CLI in the artifacts role #7231) and the yablocv1.0pin, become one-line diffs on top of this table.How to verify
Check out the branch and install the collection:
Run the role:
ansible-playbook autoware.dev_env.install_dev_env --tags artifacts -e "data_dir=$HOME/autoware_data/ml_models" --ask-become-passNote: a cold run downloads 2.68 GB. If the Hub rate-limits the anonymous downloads, set
HF_TOKEN.Make sure that the task prints one line per bundle, 20 in total, labeled
<repo> <revision>.Make sure that the recap shows
failed=0.Make sure that the versioned destinations are on disk:
To compare the table against the 20 old tasks, read the diff:
git diff main -- ansible/roles/artifacts/tasks/main.yaml.AI usage
AI usage: written with Claude Code from the follow-up list in #7223
Self-review: A clean-context Claude Code session reviewed the branch with two agents, an impact trace and an alternatives pass, in one round. The findings, three dropped comments and an unstated behavior change, are fixed on the branch. I read and approved the final diff.
Verification: The 20 rendered commands are byte-identical to the tasks they replace, shown by rendering both file versions through Ansible and diffing the output. The role ran end to end on a warm install with
failed=0. Lint is clean.Local playbook run
Ubuntu 24.04, warm
~/autoware_data/ml_models, collection reinstalled from the working tree.okline per bundle, 20 in total, labeled<repo> <revision>ok=6 changed=0 unreachable=0 failed=0 skipped=2real 0m28.070slidar_centerpointv4.0bundle was not on disk before the run. The run downloaded it, and thebase,tiny,sigmaandshort_rangevariant folders appearedinstall_dev_envplaybook. Itsversion_lockcleanup task needs sudo, which this session cannot provide. The role was run through a minimal playbook that includesautoware.dev_env.artifactswith its dependencies. Therun:health-checkCI job runs the full playbook on a cold runnerRendered command comparison
Both file versions were copied into playbooks with the
commandmodule swapped foransible.builtin.debug, run underansible-core 2.17.14withdata_dir=/DATA, and the 20 rendered strings diffed.diffempty. The(repo, revision, destination)triples match in the same order/DATA/diffusion_planner/v3.0,/v3.1,/v4.0,/v5.0and/DATA/vad/v0.1hf downloadtransfers. The test proves the argument strings, not the downloadsLoop failure semantics
A three-item loop was run with the middle item made to fail, in both shapes.
ok=0 changed=0 unreachable=0 failed=1Lint and format
ansible-lint ansible/roles/artifacts/:Passed: 0 failure(s), 0 warning(s), profileproduction, at26.6.0, the revision pinned in.pre-commit-config-ansible.yamlpre-commit runon the changed files:prettierandyamllintPassed