Skip to content

fix(processing): preserve checkpoint paths without UUIDs - #889

Draft
TimKoornstra wants to merge 1 commit into
Lightning-AI:mainfrom
TimKoornstra:fix-checkpoint-path-without-uuid
Draft

fix(processing): preserve checkpoint paths without UUIDs#889
TimKoornstra wants to merge 1 commit into
Lightning-AI:mainfrom
TimKoornstra:fix-checkpoint-path-without-uuid

Conversation

@TimKoornstra

@TimKoornstra TimKoornstra commented Aug 18, 2026

Copy link
Copy Markdown
Before submitting
  • Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?

What does this PR do?

Fixes #888. Checkpoint writers now produce stable filenames such as checkpoint-0.json, but remove_uuid_from_filename() still removed the final 38 characters from every path under .checkpoints. This truncated the output prefix and wrote checkpoint objects outside their intended directory.

This change only removes the suffix when the filename actually matches checkpoint-<rank>-<32-character hexadecimal UUID>.json. Stable checkpoint filenames and unrelated files remain unchanged.

Regression tests cover legacy UUID filenames, stable checkpoint names, configuration files, malformed UUID suffixes, and paths outside the checkpoint directory.

Validation:

  • 8 passed in tests/processing/test_utilities.py
  • Ruff lint and formatting checks pass

PR review

Anyone in the community is free to review the PR once the tests have passed.

Did you have fun?

Yes 🙃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Checkpoint uploads truncate output prefix for stable checkpoint filenames

1 participant