torch.Package extend PyTorchStreamWriter to track written records (#52218)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/52218
Test Plan: Imported from OSS
Reviewed By: suo
Differential Revision: D26429794
Pulled By: Lilyjjo
fbshipit-source-id: 5f68e7991c673ada629d0370c705520243d0637a