TorchTitan's October update is out. I fixed 2 bugs in its quick-start script
Description and use
In the TorchTitan October 2026 update, two bugs in download_hf_assets.py were fixed: the script now copies the input list to avoid mutation and produces a single‑string error message. All tests pass and the script is more reliable for repeated calls and misspelled asset types.
Problem
The quick‑start script scripts/download_hf_assets.py in TorchTitan had two bugs: it mutated the caller’s asset list and produced an error message as a tuple, causing hidden failures when the script was called twice or when an asset type was misspelled.
Outcome
The two bugs were fixed, improving script reliability and error readability. All tests passed, and the quick‑start script now behaves predictably when called multiple times or with misspelled asset types.
Workflow
- 1. Identify bugs by reproducing failures with a shared asset list and a misspelled asset type.
- 2. Open PR #5621 on GitHub.
- 3. Modify
scripts/download_hf_assets.pyto copy the list (list(asset_types)) before appendingadditional_patternsand to build a single string error message. - 4. Update tests: assert single exception argument and verify list immutability across calls.
- 5. Run full test suite on Windows 11 with Python 3.11 and torch 2.16.0.dev20261024+cpu.
- 6. Merge PR after maintainer approval.
- 7. Verify all tests pass (13 total).
Evidence
The download function was handed a list of what to fetch and wrote into that list instead of its own copy, so the caller's list came back one entry longer.
The error is now one message built from one string, so it prints as three readable lines.
I ran everything on Windows 11 with Python 3.11 and torch 2.16.0.dev20261024+cpu.
- Record date: 2026-11-01T03:14:02.736Z