AI4Finance-Foundation / ElegantRL

Massively Parallel Deep Reinforcement Learning. 🔥
https://ai4finance.org
Other
3.62k stars 832 forks source link

Isaac Gym Preview 3 Inconsistencies #109

Closed hmomin closed 2 years ago

hmomin commented 2 years ago

Hi all,

If I try to run the Isaac Gym tutorial from the docs (https://elegantrl.readthedocs.io/en/latest/tutorial/isaacgym.html), I'm unable to run it because of a missing module:

Some output:

Importing module 'gym_38' (/home/momin/Documents/isaacgym/python/isaacgym/_bindings/linux-x86_64/gym_38.so)
Setting GYM_USD_PLUG_INFO_PATH to /home/momin/Documents/isaacgym/python/isaacgym/_bindings/linux-x86_64/usd/plugInfo.json
Importing module 'rlgpu_38' (/home/momin/Documents/isaacgym/python/isaacgym/_bindings/linux-x86_64/rlgpu_38.so)

Error:

Traceback (most recent call last):
  File "examples/tutorial_Isaac_Gym.py", line 1, in <module>
    from elegantrl.envs.IsaacGym import IsaacVecEnv, IsaacOneEnv
  File "/home/momin/Documents/GitHub/ElegantRL/elegantrl/envs/IsaacGym.py", line 9, in <module>
    from elegantrl.envs.utils.parse_task import parse_task
  File "/home/momin/Documents/GitHub/ElegantRL/elegantrl/envs/utils/parse_task.py", line 11, in <module>
    from rlgpu.tasks.base.vec_task import VecTaskCPU, VecTaskGPU, VecTaskPython
ModuleNotFoundError: No module named 'rlgpu'

It looks like rlgpu is a module that's a part of the Preview 2 release of Isaac Gym, but not Preview 3. I don't think there is an analogous version of VecTaskCPU, VecTaskGPU, VecTaskPython in the new release and I can't find any downloadable version of the Preview 2 release. This means anyone who wants to use ElegantRL in the future will be unable to integrate it with Isaac Gym as it stands.

If we would like ElegantRL to be the best interface with Isaac Gym, then we'll need to figure out how to "upgrade" ElegantRL to support the Preview 3 release. The main files that need to be updated are: elegantrl/envs/utils/parse_task.py elegantrl/envs/IsaacGym.py

It seems like this will require some coordination and planning among us and I'm happy to help out.

-Momin

YangletLiu commented 2 years ago

Thx very much!! I will oversee this issue.

hmomin commented 2 years ago

This should be fixed now in the latest commits: (https://github.com/AI4Finance-Foundation/ElegantRL/commit/6b8ce1d00e99274d1ab54303bea4f76c8ccf8d2b -> https://github.com/AI4Finance-Foundation/ElegantRL/commit/255ff06b568ad37b164e42f12277691eb4584ac0)