Closed BDonnot closed 1 year ago
Hello, what are the ouput/warnings from the env checker ? (see custom env issue template)
Hello,
Thanks for the quick reply.
Sorry for missing the specific issue template for custom environment. I did not saw it before posting.
For the env I used as an example indeed I made a mistake and the env checker failed. I modified it and after modification;
obs = {"one": np.array([self._internal_state[0]]),
"two": np.array([self._internal_state[1]])}
(instead of simply returning python integer) and it does not fail anymore.
However I am pretty sure in the env for my initial problem (which is not this one) the env_checker worked. I will try to modify the "CustomGym" so that it ewhibits the same problem, if I can. Thanks for the help
Good news: bug (like most bugs) was between the chair and the keyboard...
With the error spotted on this simple cases, I manage to run the initial code which did not.
Thanks for your help and sorry for this error. Stable baselines works well on this case :-)
π Bug
When I try to use an environment with a gym Dict observation space, everything works pretty well for single process file.
I wanted to speed up computations using
SubprocVecEnv
but it appears it's not working anymore.I used a complicated gym environment when noticing the bug (hence the need to
SubprocVecEnv
) but I managed to reproduce it with a very simple one (see below). What the environment does is pretty irrelevant for this bug (in reality it's for managing powergrid, for the example it just increments two things and return +1 if the first one reaches 100 before the other...)To Reproduce
Relevant log output / Error message
System Info
OS: Linux-5.15.0-69-generic-x86_64-with-glibc2.29 #76~20.04.1-Ubuntu SMP Mon Mar 20 15:54:19 UTC 2023 Python: 3.8.10 Stable-Baselines3: 1.4.0 PyTorch: 1.10.1+cu102 GPU Enabled: True Numpy: 1.20.3 Gym: 0.18.0
Checklist