yzqin / isaacgym-stubs

Isaac Gym Python Stubs for Code Completion

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fail to run stubgen -m gym_38

ZXW2600 opened this issue · comments

I need a stub for my gym preview3, but failed to generate gym_38.pyi

stubgen -m gym_38                                       
gym_38: Failed to import, skipping with error: No module named 'gym_38'

Another try

stubgen -m gym_38 -p isaacgym                                  
Importing module 'gym_38' (/home/zhaoxw/workspace/rl_workspace/pnd/IsaacGym_Preview_3_Package/isaacgym/python/isaacgym/_bindings/linux-x86_64/gym_38.so)
Setting GYM_USD_PLUG_INFO_PATH to /home/zhaoxw/workspace/rl_workspace/pnd/IsaacGym_Preview_3_Package/isaacgym/python/isaacgym/_bindings/linux-x86_64/usd/plugInfo.json
gym_38: Failed to import, skipping with error: No module named 'gym_38'
Importing module 'gym_38' (/home/zhaoxw/workspace/rl_workspace/pnd/IsaacGym_Preview_3_Package/isaacgym/python/isaacgym/_bindings/linux-x86_64/gym_38.so)
Setting GYM_USD_PLUG_INFO_PATH to /home/zhaoxw/workspace/rl_workspace/pnd/IsaacGym_Preview_3_Package/isaacgym/python/isaacgym/_bindings/linux-x86_64/usd/plugInfo.json
PyTorch version 2.2.2+cu121
Device count 1
/home/zhaoxw/workspace/rl_workspace/pnd/IsaacGym_Preview_3_Package/isaacgym/python/isaacgym/_bindings/src/gymtorch
Using /home/zhaoxw/.cache/torch_extensions/py38_cu121 as PyTorch extensions root...
Emitting ninja build file /home/zhaoxw/.cache/torch_extensions/py38_cu121/gymtorch/build.ninja...
Building extension module gymtorch...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
ninja: no work to do.
Loading extension module gymtorch...
Importing module 'rlgpu_38' (/home/zhaoxw/workspace/rl_workspace/pnd/IsaacGym_Preview_3_Package/isaacgym/python/isaacgym/_bindings/linux-x86_64/rlgpu_38.so)
Processed 8 modules
Generated files under out/isaacgym/

But gym38.pyi is not generated.

Need some help, thank you!

It looks like your second attempt has already been success. I can help you generate the stub but unfortunately, I'm unable to download the Preview 3 version at the moment. If you could send it to my email at y1qin@ucsd.edu, I'll be able to assist you with the stub creation.

I have added a branch for IsaacGym preview 2, but I do not have the packages for Preview 3 to generate the stub

Now you can install the stub for preview 3 or 2 versions with

# For preview 3
pip3 install isaacgym_stubs==1.0rc3
# Or for preview 2
pip3 install isaacgym_stubs==1.0rc2

Thanks for your help, it works very well now!