taming-maml icon indicating copy to clipboard operation
taming-maml copied to clipboard

Check for NaN in simulation

Open chiaki530 opened this issue 3 years ago • 0 comments

Hi,

Thank you very much for the awesome code. I have run the demo code python tmaml_run_mujoco.py --env HalfCheetahRandDirecEnv and everything works fine.

However, when I try to test TMAML on other mujoco environments, such as AntRandDirec2DEnv, AntRandGoalEnv, HumanoidRandDirec2DEnv, Walker2DRandDirecEnv, etc, all of them will output the following error and cannot print the correct statistics: [33mWARN: gym.spaces.Box autodetected dtype as <class 'numpy.float32'>. Please provide explicit dtype.[0m [33mWARN: gym.spaces.Box autodetected dtype as <class 'numpy.float32'>. Please provide explicit dtype.[0m [33mWARN: gym.spaces.Box autodetected dtype as <class 'numpy.float32'>. Please provide explicit dtype.[0m [33mWARN: gym.spaces.Box autodetected dtype as <class 'numpy.float32'>. Please provide explicit dtype.[0m Process Process-33: Traceback (most recent call last): File "/itet-stor/user/net_scratch/conda_envs/tmaml/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap self.run() File "/itet-stor/user/net_scratch/conda_envs/tmaml/lib/python3.7/multiprocessing/process.py", line 99, in run self._target(*self._args, **self._kwargs) File "/scratch_net/biwidl305/user/FoRL/taming-maml/meta_policy_search/samplers/vectorized_env_executor.py", line 211, in worker all_results = [env.step(a) for (a, env) in zip(data, envs)] File "/scratch_net/biwidl305/user/FoRL/taming-maml/meta_policy_search/samplers/vectorized_env_executor.py", line 211, in <listcomp> all_results = [env.step(a) for (a, env) in zip(data, envs)] File "/scratch_net/biwidl305/user/FoRL/taming-maml/meta_policy_search/envs/normalized_env.py", line 117, in step wrapped_step = self._wrapped_env.step(scaled_action) File "/scratch_net/biwidl305/user/FoRL/taming-maml/meta_policy_search/envs/mujoco_envs/walker2d_rand_direc.py", line 31, in step self.do_simulation(a, self.frame_skip) File "/itet-stor/user/net_scratch/conda_envs/tmaml/lib/python3.7/site-packages/gym/envs/mujoco/mujoco_env.py", line 100, in do_simulation self.sim.step() File "mujoco_py/mjsim.pyx", line 119, in mujoco_py.cymj.MjSim.step File "mujoco_py/cymj.pyx", line 115, in mujoco_py.cymj.wrap_mujoco_warning.__exit__ File "mujoco_py/cymj.pyx", line 75, in mujoco_py.cymj.c_warning_callback File "/itet-stor/user/net_scratch/conda_envs/tmaml/lib/python3.7/site-packages/mujoco_py/builder.py", line 354, in user_warning_raise_exception raise MujocoException(warn + 'Check for NaN in simulation.') mujoco_py.builder.MujocoException: Unknown warning type Time = 0.0000.Check for NaN in simulation.

Do you have any idea about how to solve this?

chiaki530 avatar Dec 08 '21 19:12 chiaki530