peteanderson80 / Matterport3DSimulator

AI Research Platform for Reinforcement Learning from Real Panoramic Images.
Other
481 stars 129 forks source link

TypeError: can't pickle MatterSim.Simulator objects #108

Open IMNearth opened 2 years ago

IMNearth commented 2 years ago

Hi,

I'm trying to speed up the training of the navigation agents. I've tried python's multiprocessing package but I get this error: TypeError: can't pickle MatterSim.Simulator objects

It has been found that pybind11 support C++ objects to be pickled in python by pickling-support.

Would you please add this feature to V0.1 M3D simulator ?

Thank you.

PS: I have also tried the newest version of M3D simulator. Although the speed of new simulator is faster than the v0.1 in case of loop call, multiprocessing can speed up v0.1 simulator by 3.x faster than the newest version (batch_size = 16). I would appreciate if the v0.1 simulator can have pickle support.

IMNearth commented 2 years ago

Anyone has the idea about how to define getstate and setstate in the c++ source of M3D simulator ? I am not an expert on c++ .... :(