adding __getstate__ to fairseq_optimizer (#872)
Summary: self._optimizer has __getstate__ We need this so that fairseq_optimizer's work with pytorch/xla ``` % find . | xargs grep -s -i __getstate__ ./third_party/tensorflow/tensorflow/python/util/deprecation_wrapper.py: def __getstate__(self): ./torch_xla_py/xla_model.py: for param_group in optimizer.__getstate__()['param_groups']: ``` Pull Request resolved: https://github.com/pytorch/fairseq/pull/872 Differential Revision: D16211062 Pulled By: alexeib fbshipit-source-id: 1b5575c85d34b7b021d719a03fd58d1c2ee453ee
Showing
Please register or sign in to comment