pytorch
1e77ba36 - change ddpLoggingData struct to map or dict (#56641)

Commit
3 years ago
change ddpLoggingData struct to map or dict (#56641) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/56641 currently ddpLoggingData is flat struct, which requires internal DDP developers and external users to know about the struct field names. This is not flexible to delete or add new fields in the future. also it is hard to access ddpLoggingData. With maps/dict, developers and users can easily access the fields without knowing the field names, also easier to add/remove a new/old field. Since C++ does not support map values to be different types, right now ddpLoggingData containes two types of maps. ghstack-source-id: 127482694 Test Plan: unit tests Reviewed By: SciPioneer Differential Revision: D27923723 fbshipit-source-id: c90199c14925fc50ef219000e2f809dc7601cce1
Author
Parents
Loading