First of all, thanks for making this repository available to everyone!
I am facing a problem related to running continual world and maybe you can help. I followed the docker instructions in the readme and set up and built the container. Inside the container, when I run
python3 run_single.py --seed 0 --steps 2e3 --log_every 250 --task hammer-v1 --logger_output tsv tensorboard
I get the following error, which complains about the number of arguments returned by env.step():
/usr/local/lib/python3.6/dist-packages/gym/spaces/box.py:127: UserWarning: WARN: Box bound precision lowered by casting to float32
logger.warn(f"Box bound precision lowered by casting to {self.dtype}")
Traceback (most recent call last):
File "run_single.py", line 62, in <module>
main(logger, **args)
File "run_single.py", line 53, in main
sac.run()
File "/continualworld/continualworld/sac/sac.py", line 560, in run
next_obs, reward, done, info = self.env.step(action)
File "/continualworld/continualworld/utils/wrappers.py", line 19, in step
obs, reward, done, info = self.env.step(action)
File "/usr/local/lib/python3.6/dist-packages/gym/wrappers/time_limit.py", line 50, in step
observation, reward, terminated, truncated, info = self.env.step(action)
ValueError: not enough values to unpack (expected 5, got 4)
I edited the file /usr/local/lib/python3.6/dist-packages/gym/wrappers/time_limit.py and removed the truncated return value and after this the script run_single.py runs fine.
def step(self, action):
"""Steps through the environment and if the number of steps elapsed exceeds ``max_episode_steps`` then truncate.
Args:
action: The environment step action
Returns:
The environment step ``(observation, reward, terminated, truncated, info)`` with `truncated=True`
if the number of steps elapsed >= max episode steps
"""
observation, reward, terminated, info = self.env.step(action)
#observation, reward, terminated, truncated, info = self.env.step(action)
self._elapsed_steps += 1
if self._elapsed_steps >= self._max_episode_steps:
truncated = True
# return observation, reward, terminated, truncated, info
return observation, reward, terminated, info
I am not sure if this is an issue with a version of gym or something else. I am pretty sure I followed the exact steps described in the readme. Perhaps you can suggest a remedy so that I can run the example code without any hacks like changing the internals of llibrary functions? Thanks in advance.
First of all, thanks for making this repository available to everyone!
I am facing a problem related to running continual world and maybe you can help. I followed the docker instructions in the readme and set up and built the container. Inside the container, when I run
I get the following error, which complains about the number of arguments returned by env.step():
I edited the file /usr/local/lib/python3.6/dist-packages/gym/wrappers/time_limit.py and removed the
truncatedreturn value and after this the scriptrun_single.pyruns fine.I am not sure if this is an issue with a version of gym or something else. I am pretty sure I followed the exact steps described in the readme. Perhaps you can suggest a remedy so that I can run the example code without any hacks like changing the internals of llibrary functions? Thanks in advance.