-
Notifications
You must be signed in to change notification settings - Fork 430
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
Error if device mesh specified in fsdp config #3580
Conversation
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.
this seems fine to me, so approving. But wondering if it would be a bit easier to make FSDPConfig
take in a device_mesh
arg and just raise if it is specified. That way you don't have to put the error in multiple places
@dakinggg I wanted to only error in the case where we used to throw the deprecation warning so this won't break users workflows without prior notice. For example, if someone explicitly creates an FSDPConfig object and passes that to the trainer, that wasn't marked as deprecated and we shouldn't error. We should only error for the deprecation path, which was for dict fsdp config + dict parallelism config (this covers foundry case). lmk if you disagree taking out the error on |
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.
We only want to set device mesh in state.py
, so I agree with Daniel lets just check in constructor?
@mvpatel2000 made that change, modified init to still throw informative error for user |
What does this PR do?
Ensures that we throw value error if device mesh is directly specified in the fsdp config. We want users to more to the more descriptive, less confusing
data_parallel_shard_degree
anddata_parallel_replicate_degree
instead. Adding this error prevents users from accidentally configuring their parallelism differently than the device mesh would indicate -- we won't allow for directly specifying device mesh at all.Basically changes the warning / warning test removed in #3570 to error / error test.
What issue(s) does this change relate to?
Before submitting
pre-commit
on your change? (see thepre-commit
section of prerequisites)