fix test_serialization not working with Windows. (#46120)
Summary:
fixes https://github.com/pytorch/pytorch/issues/45917.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/46120
Reviewed By: janeyx99
Differential Revision: D24253317
Pulled By: walterddr
fbshipit-source-id: 6caa0970b3e3eb972d314639be773a104a4e89a5