After removing the deepcopy, the model fails with the following issue
Traceback (most recent call last):
File "./torchbench.py", line 1099, in <module>
main()
File "./torchbench.py", line 981, in main
run_one_model(
File "./torchbench.py", line 1044, in run_one_model
correct_result = model_iter_fn(model, example_inputs)
File "./torchbench.py", line 525, in forward_pass
return mod(*inputs)
File "/data/home/anijain/miniconda/envs/pytorch_dev/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1129, in _call_impl
return forward_call(*input, **kwargs)
File "/data/home/anijain/miniconda/envs/pytorch_dev/lib/python3.8/site-packages/torch/nn/modules/module.py", line 201, in _forward_unimplemented
raise NotImplementedError(f"Module [{type(self).__name__}] is missing the required \"forward\" function")
NotImplementedError: Module [RobertaHubInterface] is missing the required "forward" function
First error comes while
deepcopy
ing the model. And its a known issue - https://githubhot.com/repo/pytorch/fairseq/issues/4185After removing the
deepcopy
, the model fails with the following issue