-
Notifications
You must be signed in to change notification settings - Fork 801
Add a loss comparison script #2029
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
Changes from 12 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
546847a
Update (base update)
fegin dd979ef
Update
fegin 0e78d18
Update (base update)
fegin 4b4e547
Update
fegin fa43b28
Update (base update)
fegin 4f2b8bd
Update
fegin cbec465
Update (base update)
fegin 74f9fb7
Update
fegin 0cfde37
Update (base update)
fegin 9bb1b33
Update
fegin e393a13
Update
fegin a53269f
Update
fegin 88f37f6
Update
fegin 67708b9
Update
fegin 1425d8a
Update
fegin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why comparing these two? FSDP 8 vs. HSDP 4, 2
Also we are not using the assert_equal flag, so what happens if the losses are different? Are you analyzing them with some other scripts?
I thought the idea was we should compare main and PR submit, but for that it may be easier to assert with a fixed loss number.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I should add
--assert_equal—I'll update it.I originally planned to compare the current PR with the main branch. The problem is that CI mounts the folder as read-only, so I couldn't check out the "main" version. I took a step back and decided to verify the minimum guarantees: at least some parallelism variations should have the same losses. Since this check is quick, I think it doesn't hurt to add it (we can also verify TP). This way, we ensure the minimum guarantees and also validate the script.
For comparing with the "main" branch, one way to achieve this is to pre-record the results and add an option to the tool to read them. Both baseline and test runs must match the pre-recorded losses when
--assert_equalis set. The downside is that this approach is less stable than simply checking out during CI, since the pre-recorded method can't tolerate machine or library changes.I prefer to do this in another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, but here are two cases if numerics change?
I guess we could say the latter should be captured by upstream library?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, we can do this. Will do this in another PR.