Repair `num_batch` field access and cleanup code (#2020)
Summary:
- Repair the number of batches field
- Add cleanup code to the Dynamo compilation to avoid engine cache collisions
- Repair formatting + apply linting in the code
Pull Request resolved: https://github.com/pytorch/benchmark/pull/2020
Reviewed By: davidberard98
Differential Revision: D50844816
Pulled By: xuzhao9
fbshipit-source-id: 3fed89b5e5921c86644fc98544e30ac59cfca791