Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using FormattedCheckpointFiles in configs #2147

Merged
merged 2 commits into from
Dec 13, 2024

Conversation

SalmanMohammadi
Copy link
Collaborator

Context

What is the purpose of this PR? Is it to

  • add a new feature
  • fix a bug
  • update tests and/or documentation
  • other (please add here)

Please link to any issues this PR addresses.

closes #2073

A super duper sanity check since we didn't have an example of the pytorch_model-{}-of-{}.bin format

from torchtune.training.checkpointing._utils import FormattedCheckpointFiles
fmt = FormattedCheckpointFiles(filename_format="pytorch_model-{}-of-{}.bin", max_filename="00015")
fmt.build_checkpoint_filenames()
['pytorch_model-00001-of-00015.bin',
 'pytorch_model-00002-of-00015.bin',
 'pytorch_model-00003-of-00015.bin',
 'pytorch_model-00004-of-00015.bin',
 'pytorch_model-00005-of-00015.bin',
 'pytorch_model-00006-of-00015.bin',
 'pytorch_model-00007-of-00015.bin',
 'pytorch_model-00008-of-00015.bin',
 'pytorch_model-00009-of-00015.bin',
 'pytorch_model-00010-of-00015.bin',
 'pytorch_model-00011-of-00015.bin',
 'pytorch_model-00012-of-00015.bin',
 'pytorch_model-00013-of-00015.bin',
 'pytorch_model-00014-of-00015.bin',
 'pytorch_model-00015-of-00015.bin']

Copy link

pytorch-bot bot commented Dec 10, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/torchtune/2147

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 921ccde with merge base 5370e0d (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 10, 2024
Copy link
Contributor

@felipemello1 felipemello1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for doing it! I looked at it twice and everything looks good. But we are so close to a release that i am afraid that there may be some error if we dont test it. We can either: I will approve it, but assuming that you didnt try these configs, i am not sure if it should make it to this release

@SalmanMohammadi
Copy link
Collaborator Author

thanks for doing it! I looked at it twice and everything looks good. But we are so close to a release that i am afraid that there may be some error if we dont test it. We can either: I will approve it, but assuming that you didnt try these configs, i am not sure if it should make it to this release

As you wish. I thought about testing it but it's a lot of effort for a minor change.

@joecummings
Copy link
Contributor

Should merge this after the release branch is cut @felipemello1

@joecummings joecummings merged commit cdaece1 into pytorch:main Dec 13, 2024
17 checks passed
@SalmanMohammadi SalmanMohammadi deleted the 2073 branch December 16, 2024 12:01
rahul-sarvam added a commit to sarvamai/torchtune that referenced this pull request Dec 18, 2024
* Llama 3.3 70B (pytorch#2124)

* Llama 3.3 readme updates (pytorch#2125)

* update configs (pytorch#2107)

Co-authored-by: Felipe Mello <[email protected]>

* Reduce logging output for distributed KD (pytorch#2120)

* Support Early Exit Loss and/or Layer Dropout (pytorch#1076)

Co-authored-by: ebsmothers <[email protected]>

* Update checkpointing directory (pytorch#2074)

Co-authored-by: Felipe Mello <[email protected]>
Co-authored-by: vancoyendall <[email protected]>

* pass correct arg (pytorch#2127)

Co-authored-by: Felipe Mello <[email protected]>

* update configs (pytorch#2128)

Co-authored-by: Felipe Mello <[email protected]>

* fix qat_lora_test (pytorch#2131)

Co-authored-by: Felipe Mello <[email protected]>

* guard ckpt imports (pytorch#2133)

Co-authored-by: Felipe Mello <[email protected]>

* [bug fix] add parents=True (pytorch#2136)

Co-authored-by: Felipe Mello <[email protected]>

* [bug fix] re-add model (pytorch#2135)

Co-authored-by: Felipe Mello <[email protected]>

* Update save sizes into GiB (pytorch#2143)

* [bug fix] remove config download when source is kaggle (pytorch#2144)

Co-authored-by: Felipe Mello <[email protected]>

* [fix] remove "with_suffix" (pytorch#2146)

Co-authored-by: Felipe Mello <[email protected]>

* DoRA fixes (pytorch#2139)



Co-authored-by: Mircea Mironenco <[email protected]>

* [Fix] Llama 3.2 Vision decoder_trainable flag fixed (pytorch#2150)

* Small readme, config updates (pytorch#2157)

* Using `FormattedCheckpointFiles` in configs (pytorch#2147)

* Move ``get_world_size_and_rank`` to utils (pytorch#2155)

* Faster intermediate checkpoints with DCP async save in TorchTune (pytorch#2006)

Co-authored-by: Saurabh Mishra <[email protected]>

* torchdata integration - multi-dataset and streaming support (pytorch#1929)

* Allow higher version of lm-eval (pytorch#2165)

* Using `FormattedCheckpointFiles` in configs... round 2 (pytorch#2167)

* [EZ] Fix set_torch_num_threads in multi-node. (pytorch#2164)

---------

Co-authored-by: Philip Bontrager <[email protected]>
Co-authored-by: ebsmothers <[email protected]>
Co-authored-by: Felipe Mello <[email protected]>
Co-authored-by: Felipe Mello <[email protected]>
Co-authored-by: Joe Cummings <[email protected]>
Co-authored-by: Mostafa Elhoushi <[email protected]>
Co-authored-by: vancoyendall <[email protected]>
Co-authored-by: Mircea Mironenco <[email protected]>
Co-authored-by: salman <[email protected]>
Co-authored-by: Saurabh Mishra <[email protected]>
Co-authored-by: Saurabh Mishra <[email protected]>
Co-authored-by: Andrew Ho <[email protected]>
Co-authored-by: Eugen Hotaj <[email protected]>
rahul-sarvam pushed a commit to sarvamai/torchtune that referenced this pull request Dec 23, 2024
rahul-sarvam pushed a commit to sarvamai/torchtune that referenced this pull request Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Clean up] Use FormattedFiles in configs
4 participants