Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

TorchTitan's October update is out. I fixed 2 bugs in its quick-start script

Описание и применение

В обновлении TorchTitan 21 октября 2026 года исправлены две ошибки в скрипте download_hf_assets.py: теперь он копирует входной список, не изменяя его, и выводит сообщение об ошибке в читаемом виде. Все тесты проходят, а скрипт становится надёжнее при многократных вызовах и при опечатках в типах активов.

Задача

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.

Результат

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.

Рабочий процесс

  • 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.py to copy the list (list(asset_types)) before appending additional_patterns and 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).

Доказательства

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.

Источник

  • Дата записи: 2026-11-01T03:14:02.736Z