Antonin RAFFIN
Antonin RAFFIN
" Due to design differences, input/output format between PyTorch model and exported ONNX model are often not the same. E.g., None is allowed for PyTorch model, but are not supported...
Duplicate of https://github.com/DLR-RM/stable-baselines3/issues/1831
could you elaborate a bit? where was that change announced?
Thanks, btw what is the minimum pytorch version to be able to set `weights_only=True`?
After trying out, we cannot use `weights_only=True` in SB3 as it breaks some functionality, see https://github.com/DLR-RM/stable-baselines3/pull/1866. It would be nice to be able to extend `_get_allowed_globals()` for the unpickler.
> If you're getting the error: Please provide a minimal example to reproduce the error. > throws this if I do a model.save and model.load of a PPO model. I...
thanks for finding out. I can reproduce with: ```python from stable_baselines3 import PPO import numpy as np model = PPO("MlpPolicy", "CartPole-v1", learning_rate=lambda _: np.sin(1)) model.save("demo") model = PPO.load("demo") ``` it...
> Maybe something similar where it's using fancy numpy types? it's different, the problem occurs because we want to save the complete `nn.Module` object that contains types (from gymnasium, potentially...
@Franziac please provide a minimal working example to reproduce the issue.
@Franziac please have a look at https://github.com/DLR-RM/stable-baselines3/issues/1911, it seems to be due to an old version of PyTorch, in the meantime, I will revert the change and release SB3 2.3.2...