Unpickling Error for Detectron2

Hello, I am training a zoo model from detectron2 where I want to use transfer learning so I was adding pretrained weight. The .pth format is working properly but I am unable to use the pretrained weight which are as .pkl file

UnpicklingError: A load persistent id instruction was encountered,
but no persistent_load function was specified.

I tried to write a new function but unable to get it work.

It seems you are trying to load the file multiple times.
Would using pickle.load without PathManager.open work?