pytorch/torch/testing
Yanli Zhao 1e77ba36db 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
2021-04-28 06:43:25 -07:00
..
_internal change ddpLoggingData struct to map or dict (#56641) 2021-04-28 06:43:25 -07:00
__init__.py Un-ignore F403 in .flake8 (#55838) 2021-04-13 09:24:07 -07:00
_asserts.py enable support for custom error messages in torch.testing (#55890) 2021-04-24 23:37:44 -07:00
_check_kernel_launches.py make torch.testing asserts importable (#54769) 2021-04-07 23:53:02 -07:00
_core.py OpInfo porting for torch.real & torch.imag (#55134) 2021-04-15 13:28:21 -07:00