10000 Make memory logging great again by RdoubleA · Pull Request #817 · pytorch/torchtune · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Make memory logging great again #817

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

Merged
merged 2 commits into from
Apr 20, 2024
Merged

Conversation

RdoubleA
Copy link
Collaborator

Better format the memory stats log output

Ran recipes to confirm logs

image

Copy link
pytorch-bot bot commented Apr 19, 2024

🔗 Helpful Links

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

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

✅ No Failures

As of commit ddc0197 with merge base 41341fd (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 Apr 19, 2024
Copy link
Contributor
@kartikayk kartikayk left a comment

Choose a reason for hiding this comment

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

Why not just add this to the memory_stats_log utils so you dont need to copy past this everywhere?

@RdoubleA
Copy link
Collaborator Author
RdoubleA commented Apr 19, 2024

@kartikayk Don't we want the recipe to control all logging? there could be use cases where you just want the peak memory stats without logging it. I purposely did not add it for that reason, otherwise I agree

@kartikayk
Copy link
Contributor

We already have logging done in many of our utils (eg: seed.py), so I think its ok? Plus this function sets expectation that it'll log. In a previous version of this, I was actually using this same function in setup_model as well to log stats after model initi. So it would be good to just do it in the function otherwise we'd just be copying all of this many time?

@ebsmothers
Copy link
Contributor

Sorry missed the convo on here before stamping and just looked at the code. I'm fine with moving this to a util in memory.py, the one thing I would ask is that we keep the current version of memory_stats_log that returns a dict as it's much more amenable to our metric_logger classes

@kartikayk
Copy link
Contributor

returns a dict as it's much more amenable to our metric_logger classes

What does this mean? :)

@RdoubleA RdoubleA merged commit fde0dc4 into pytorch:main Apr 20, 2024
27 checks passed
@RdoubleA RdoubleA deleted the memory_logging branch April 20, 2024 02:24
yinfan98 pushed a commit to yinfan98/sgl-tune-eagle that referenced this pull request May 26, 2025
This is dependent on the changes in this pytorch stack:
pytorch/pytorch#146217

Add support for running `ZBVZeroBubbleSchedule` and v-shaped CSV
schedules in torchtitan

Fixes pytorch/torchtitan#774

---------

Co-authored-by: tianyu-l <150487191+tianyu-l@users.noreply.github.com>
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.

4 participants
0