[Model Averaging] Update model averager API to avoid the redundant `params` arg needed by post-localSGD optimizer (#62132)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/62132
as title
Proposal: https://github.com/pytorch/pytorch/issues/59699
ghstack-source-id: 134560541
Test Plan:
buck test mode/dev-nosan caffe2/test/distributed:distributed_nccl_fork -- test_post_localSGD_optimizer_parity
buck test mode/dev-nosan caffe2/test/distributed:distributed_nccl_fork -- test_periodic_model_averager
Reviewed By: rohan-varma
Differential Revision: D29887751
fbshipit-source-id: 60dadb04790d800fdcc7cb8a08d060e411718739