[DataLoader] Add context manager for runtime type validation (#55936)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/55936
Test Plan: Imported from OSS
Reviewed By: VitalyFedyunin
Differential Revision: D27743476
Pulled By: ejguan
fbshipit-source-id: 8f0454ccf3ec37807598056433bff91013fa9bb9