[BUG] SAC example is broken. Missing keys
Open
@vmoens is already working on this.
Since May 23, 2023.
bug
- Dominant language
- Python
- Stars
- 3.6k
- Forks
- 487
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 207
Description
Describe the bug
SAC example is broken.
To Reproduce
- install torchrl version 1.1
- clone pytoch/rl
- python3 example/sac/sac.py
Please try to provide a minimal example to reproduce the bug. Error messages and stack traces are also helpful.
Error executing job with overrides: []
Traceback (most recent call last):
File "/home/fabiankranewitter/Downloads/demo/rl/examples/sac/sac.py", line 173, in main
recorder.transform[1:].load_state_dict(create_env_fn().transform.state_dict())
File "/home/fabiankranewitter/.pyenv/versions/python_3.10_venv_bthn/lib/python3.10/site-packages/torch/nn/modules/module.py", line 2041, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for Compose:
Missing key(s) in state_dict: "transforms.1.standard_normal", "transforms.1.loc", "transforms.1.scale".
Unexpected key(s) in state_dict: "transforms.0.standard_normal", "transforms.0.loc", "transforms.0.scale", "transforms.2.standard_normal", "transforms.2.loc", "transforms.2.scale".
Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
Expected behavior
That the program doesn't hang up and the training of the network works.
System info
Python 3.10
PIP List
Package Version
---------------------------- ----------
absl-py 1.4.0
ale-py 0.8.1
antlr4-python3-runtime 4.9.3
appdirs 1.4.4
astunparse 1.6.3
atari-py 0.2.9
attrs 22.2.0
AutoROM 0.4.2
AutoROM.accept-rom-license 0.6.0
cachetools 5.3.0
certifi 2022.12.7
cffi 1.15.1
charset-normalizer 3.1.0
click 8.1.3
cloudpickle 2.2.1
cmake 3.26.1
contourpy 1.0.7
cycler 0.11.0
Cython 0.29.34
decorator 4.4.2
device 0.1
dm-control 1.0.11
dm-env 1.6
dm-tree 0.1.8
docker-pycreds 0.4.0
exceptiongroup 1.1.1
Farama-Notifications 0.0.4
fasteners 0.18
filelock 3.10.7
flatbuffers 23.3.3
fonttools 4.39.3
gast 0.4.0
gitdb 4.0.10
GitPython 3.1.31
glfw 2.5.9
google-auth 2.17.1
google-auth-oauthlib 1.0.0
google-pasta 0.2.0
grpcio 1.53.0
gym 0.26.2
gym-notices 0.0.8
gymnasium 0.28.1
h5py 3.8.0
hydra-core 1.3.2
hydra-submitit-launcher 1.2.0
idna 3.4
imageio 2.27.0
imageio-ffmpeg 0.4.8
importlib-resources 5.12.0
iniconfig 2.0.0
jax 0.4.8
jax-jumpy 1.0.0
Jinja2 3.1.2
keras 2.12.0
kiwisolver 1.4.4
labmaze 1.0.6
libclang 16.0.0
libtorrent 2.0.7
lit 16.0.0
llvmlite 0.39.1
lxml 4.9.2
Markdown 3.4.3
MarkupSafe 2.1.2
matplotlib 3.7.1
ml-dtypes 0.1.0
moviepy 1.0.3
mpmath 1.3.0
mujoco 2.3.5
networkx 3.0
numba 0.56.4
numpy 1.23.5
nvidia-cublas-cu11 11.10.3.66
nvidia-cuda-cupti-cu11 11.7.101
nvidia-cuda-nvrtc-cu11 11.7.99
nvidia-cuda-runtime-cu11 11.7.99
nvidia-cudnn-cu11 8.5.0.96
nvidia-cufft-cu11 10.9.0.58
nvidia-curand-cu11 10.2.10.91
nvidia-cusolver-cu11 11.4.0.1
nvidia-cusparse-cu11 11.7.4.91
nvidia-nccl-cu11 2.14.3
nvidia-nvtx-cu11 11.7.91
oauthlib 3.2.2
omegaconf 2.3.0
opt-einsum 3.3.0
packaging 23.0
pandas 2.0.0
pathtools 0.1.2
Pillow 9.5.0
pip 23.1.2
pluggy 1.0.0
proglog 0.1.10
protobuf 4.22.1
psutil 5.9.4
pyasn1 0.4.8
pyasn1-modules 0.2.8
pycparser 2.21
pygame 2.3.0
PyOpenGL 3.1.6
pyparsing 3.0.9
pyquaternion 0.9.9
pytest 7.2.2
pytest-instafail 0.5.0
python-dateutil 2.8.2
pytz 2023.3
PyYAML 6.0
requests 2.30.0
requests-oauthlib 1.3.1
rsa 4.9
scipy 1.10.1
seaborn 0.12.2
sentry-sdk 1.18.0
setproctitle 1.3.2
setuptools 65.5.0
similaritymeasures 0.7.0
six 1.16.0
smmap 5.0.0
submitit 1.4.5
sympy 1.11.1
tensorboard 2.13.0
tensorboard-data-server 0.7.0
tensorboard-plugin-wit 1.8.1
tensordict 0.1.2
tensorflow-estimator 2.12.0
tensorflow-io-gcs-filesystem 0.32.0
termcolor 2.3.0
tomli 2.0.1
torch 2.0.0
torchdiffeq 0.2.3
torchrl 0.1.1
tqdm 4.65.0
triton 2.0.0
typing_extensions 4.5.0
tzdata 2023.3
urllib3 1.26.15
wandb 0.14.0
Werkzeug 2.2.3
wheel 0.40.0
wrapt 1.14.1```
This is how you dropdown.
</details>
## Additional context
Add any other context about the problem here.
## Reason and Possible fixes
If you know or suspect the reason for this bug, paste the code lines and suggest modifications.
## Checklist
- [x] I have checked that there is no similar issue in the repo (**required**)
- [x] I have read the [documentation](https://github.com/pytorch/rl/tree/main/docs/) (**required**)
- [x] I have provided a minimal working example to reproduce the bug (**required**)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.