When modifying any of these template source files, you MUST also update the migration skill documentation:
Tracked source files:
callbacks.py,config.py,util.py,cli.pycheckpoint.py,pruner.py,provenance.py,main.py
Migration docs to update:
skills/pytorch-migrate/SKILL.md(version detection table + migration summary)skills/pytorch-migrate/references/migrations.md(detailed migration steps)
- Create a new migration section (M7, M8, ...) in
references/migrations.md - Add detection marker(s) to the version table in
SKILL.md - Include: detection grep pattern, which files/classes/methods to copy from
$TEMPLATE_DIR, wiring instructions - Do NOT embed code snippets — the migration clones the latest template and reads code from there
- Update the relevant migration section's structural description (class names, method signatures, field names) if they changed
- The actual code is always read from the template clone, so minor code changes don't require migration doc updates
- Use Gitflow: feature branches from
main - Run
pytest tests/ -x -qbefore committing - Run
python -m cli preflight configs/run_template.yaml --device cputo verify template health - A pre-push hook enforces migration doc updates when source files change