Pickle Error in clean_namespace
🐛 Bug

I am using a special model which includes ScriptModules. When I call trainer.fit() the clean_namespace() function in the training loop throws a pickle.PickleError. By my understanding, this function is supposed to remove unpickleable attributes. is_picklable() catches pickle.PicklingError but not pickle.PickleError and thus raises the error all the way up to the user instead of catching it and removing the attribute from the hparams_dict.
To Reproduce
Use a model with parts that are unpicklable due to being ScriptModules. pickle.PickleError will be thrown on training start and error out the entire training instead of being caught in is_picklable().
Expected behavior
Remove the model from hparams_dict as I think is intended since the model is not picklable.
Environment

PyTorch Version (e.g., 1.0): 1.7
OS (e.g., Linux): Linux
How you installed PyTorch (conda, pip, source): conda
Python version: 3.8.8
CUDA/cuDNN version: 11.0
Any other relevant information: Pytorch Lightning: 1.2.3

Thanks!!