Include module name and type in validation error messages#823
Conversation
Previously, validation errors from ModuleValidator.validate() did not indicate which specific sub-module caused the failure. For models with many layers, this made debugging DP compatibility issues difficult — users had to manually inspect each layer to find the offending module. This change prepends the module path and type to each validation error message. For example, instead of: 'BatchNorm cannot support DP' users now see: 'encoder.layer.3.norm (BatchNorm2d): BatchNorm cannot support DP' This makes it immediately clear which layer needs to be replaced, especially in large models with hundreds of sub-modules. Addresses the TODO: 'use module name here - it's useful part of error message'
|
Hi @RohithVangalla1! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
Previously, validation errors from ModuleValidator.validate() did not indicate which specific sub-module caused the failure. For models with many layers, this made debugging DP compatibility issues difficult — users had to manually inspect each layer to find the offending module.
This change prepends the module path and type to each validation error message. For example, instead of:
'BatchNorm cannot support DP'
users now see:
'encoder.layer.3.norm (BatchNorm2d): BatchNorm cannot support DP'
This makes it immediately clear which layer needs to be replaced, especially in large models with hundreds of sub-modules.
Addresses the TODO:
'use module name here - it's useful part of error message'
Types of changes
Motivation and Context / Related issue
How Has This Been Tested (if it applies)
Checklist