"TypeError: can't pickle _thread.lock objects" when logging tables to WandB
🐛 Bug
To Reproduce
Try to log tables using WandLogger, e.g.:
    def validation_epoch_end(self, outputs: List[Any]) -> None:

        df = pd.DataFrame(
            {
                'my_stats': [1,2,3]
            }
        )

        table = wandb.Table(dataframe=df)
        self.log("examples", table)
After the first epoch (i.e. when the model checkpoint is saved), the error occurs:
TypeError: can't pickle _thread.lock objects
Expected behavior
Pickling models should succeed.
Environment
CUDA:

GPU:
NVIDIA GeForce RTX 3090
NVIDIA GeForce RTX 2060 SUPER
available: True
version: 11.1
Packages:
numpy: 1.20.1
pyTorch_debug: False
pyTorch_version: 1.8.0+cu111
pytorch-lightning: 1.2.4
tqdm: 4.59.0
System:
OS: Linux
architecture:
64bit
ELF
processor:
python: 3.7.9
version: #1 SMP Tue Jun 23 12:58:10 UTC 2020