Closed anilkurkcu closed 1 year ago
Ok I think I found a solution for this, just putting it here in case it would be helpful for anyone :)
In file stable_baselines3/common/save_util.py, I had to change line 164 to:
deserialized_object = cloudpickle.loads(base64_object, encoding='latin1')
Hello,
this type of error usually occurs when something was saved in python 2 and then loaded in python 3: https://stackoverflow.com/questions/11305790/pickle-incompatibility-of-numpy-arrays-between-python-2-and-3
I also cannot reproduce the error using the provided code (you can try in a google colab).
I found a solution for this
Good to hear =)
🐛 Bug
I am able to save my policy with model.save(), but cannot load it with SAC.load()
== CURRENT SYSTEM INFO == OS: Linux-5.4.0-126-generic-x86_64-with-debian-bullseye-sid #142-Ubuntu SMP Fri Aug 26 12:12:57 UTC 2022 Python: 3.7.0 Stable-Baselines3: 1.6.2 PyTorch: 1.12.1 GPU Enabled: True Numpy: 1.21.5 Gym: 0.21.0
== SAVED MODEL SYSTEM INFO == OS: Linux-5.4.0-126-generic-x86_64-with-debian-bullseye-sid #142-Ubuntu SMP Fri Aug 26 12:12:57 UTC 2022 Python: 3.7.0 Stable-Baselines3: 1.6.2 PyTorch: 1.12.1 GPU Enabled: True Numpy: 1.21.5 Gym: 0.21.0
Code example
Relevant log output / Error message
System Info
No response
Checklist