sail-sg / envpool

C++-based high-performance parallel environment execution engine (vectorized env) for general RL environments.
https://envpool.readthedocs.io
Apache License 2.0
1.08k stars 99 forks source link

[BUG] Mujoco: WARNING: Unknown warning type Time = 0.4000. #105

Closed Trinkle23897 closed 2 years ago

Trinkle23897 commented 2 years ago

Describe the bug

When running mujoco env, with some configuration it raises this warning.

To Reproduce

On my laptop

$ cd benchmark
$ python3 test_envpool.py --env mujoco --num-envs 17 --batch-size 17
Namespace(batch_size=17, env='mujoco', num_envs=17, num_threads=0, seed=0, thread_affinity_offset=0,
total_step=50000)
  0%|                                                                         | 0/50000 [00:00<?, ?it/s]
WARNING: Unknown warning type Time = 5.0500.

  0%|▍                                                            | 102/50000 [00:00<00:49, 1011.42it/s]
WARNING: Unknown warning type Time = 5.0500.

WARNING: Unknown warning type Time = 5.0500.

WARNING: Unknown warning type Time = 5.0500.

WARNING: Unknown warning type Time = 5.0500.

Expected behavior

No warning

System info

My laptop. But this phenomenon also exists in other hardware, e.g., workstation: 50 wait 20.

Additional context

Related issue: https://github.com/openai/mujoco-py/issues/340 This error only occurs when batch_size > 16 Manually checked with NaN and inf but everything looks good. The sleep solution to some extent helps, but it's not a good solution, i.e., adding print will reduce the possibility of this warning's occurance.

Reason and Possible fixes

Wait until deepmind release the mujoco source code (hopefully in mid-May). Add traceback and find the root cause. This error generates from libmujoco.so.2.1.5 A pure C++ working example to reproduce this bug would be very helpful.

Checklist

kevinzakka commented 2 years ago

Out of curiosity, have you tried reducing the physics timestep?

Trinkle23897 commented 2 years ago

I set the number of substep to 1 but it can still produce this warning.