Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom IMPORT_USER_MODULES to user_config.py #99

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

abefetterman
Copy link

Modules listed in IMPORT_USER_MODULES will be imported before making gym environments, for example add 'pybullet_envs' to enable pybullet environments to be used in command line

@jachiam
Copy link
Contributor

jachiam commented Jan 24, 2019

Hi @abefetterman! I just looked through---mostly looks great! But I'm curious, why does the custom import happen separately across so many files? Since, if I'm remembering correctly, the aim for the custom import modules is to allow gym registration, I think you only would need to put this in the __init__.py for spinup. Then the new Gym envs will be accessible from any other file that imports spinup and calls gym.make. (Please feel free to correct me if I'm wrong, I might be.)

@abefetterman
Copy link
Author

abefetterman commented Jan 24, 2019

I usually avoid putting external imports into __init__.py, as it can create unnecessary dependencies and make debugging difficult. However in this case it doesn't import anything by default, and can be toggled easily in the user_config, so I think we can get away with it. It does lead to a much cleaner implementation. See the updated code for the PR.

@pkol
Copy link

pkol commented Dec 20, 2019

@abefetterman , @jachiam You may be also interested in my PR which may be better solution to this problem: #201

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants