Fix optimizer type hint (#20648)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/20548
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20648
Differential Revision: D15453935
Pulled By: ezyang
fbshipit-source-id: 8778e819c58fdc2620f123ec5b5fd568e23b7705