FOCAL-ICLR icon indicating copy to clipboard operation
FOCAL-ICLR copied to clipboard

Gym homonym conflict issue

Open Folly135 opened this issue 11 months ago • 1 comments

Hello, I have some further questions about gym that I think are crucial to running this code correctly. I feel that logically, the system should first search the gym directory under rand_param_envs for contents, and only use the gym directory installed in the python environment when not found, however after installing requirements.txt and running export PYTHONPATH=./rand_param_envs:$PYTHONPATH as per the readme, the gym folder completely overrides the gym in the python environment. This causes calls to always be made in the folder, and when a function is not found in the folder, it gives an error instead of searching the python environment to see if the corresponding function exists there.

I cannot understand or resolve this name conflict issue, and I'm wondering if you have encountered this problem before and how you solved it. Would you be able to provide any insight or advice to solve this gym folder vs gym library conflict?

I hope to receive your reply. Best wishes to you!

Folly135 avatar Jul 17 '23 09:07 Folly135

@Folly135

The purpose of using submodule rand_param_envs is essentially, to run experiments on task distributions where different tasks correspond to different model parameters (Walker and Hopper). You can checkout the definition of the Walker and Hopper envs at ./rand_param_envs/walker2d_rand_params.py and ./rand_param_envs/hopper_rand_params.py, respectively.

To resolve name conflict, I think the easiest way is to rename the gym module at ./rand_param_envs/gym and change all dependencies accordingly, such as the imports in ./rand_param_envs/walker2d_rand_params.py and ./rand_param_envs/base.py.

Please let me know if this works for you!

LanqingLi1993 avatar Jul 23 '23 06:07 LanqingLi1993