-
-
Notifications
You must be signed in to change notification settings - Fork 788
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
[Bug fix] remove mujoco-py
import error for v4+ MuJoCo environments
#934
[Bug fix] remove mujoco-py
import error for v4+ MuJoCo environments
#934
Conversation
…to git-split-temp
…d keep both files
Adjusted all imports The split files contain the commit history
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I said in the issue with regard to baseMujocoEnv
, do not move it from mujoco.py
instead create copy in mujoco_py_env.py
See my answer to your comments about the imports in init. Three files are needed to enable importing from say mujoco_py without importing from mujoco |
Your pre-commit pipeline was not running on my machine because of some pkg_resources related error. Unfortunately, there was no setup instructions in the contributing.md. Could you either reformat the code yourself or share the development setup with me? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the miscommunication on my part, (since my initial comment in your issue and now, we have marked mujoco-py
environments as explicitly deprecated)
Here is are the updated requirements happen:
files:
mujoco_env.py
: keepbaseMujocoEnv
&MujocoEnv
mujoco_py_env.py
: place a copy ofbaseMujocoEnv
(and rename it tobaseMujocoPyEnv
) &MujocoPyEnv
motivation: MujocoPyEnv
should be in its own file with nothing external affecting it, BaseMujocoEnv
will eventually be "merged" with MujocoEnv
I see, makes sense. I'll adjust accordingly and write a block comment in the reasons for the code duplication |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, sorry for being late review, I missed the request for review
mostly looks good
5d097e6
to
74293d4
Compare
@Kallinteris-Andreas no problem, happens to me too :) Done now. One more import in a test file was adjusted to be consistent with the remaining imports (I did a search-replace) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking almost done
To fix the failing test
change
assert isinstance(env, BaseMujocoEnv)
to
assert isinstance(env, BaseMujocoEnv) or isinstance(env, BaseMujocoPyEnv)
then rebase to main, and we should be ready for merge
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent, Thank you
mujoco-py
import error for v4+ MuJoCo environments
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes #896
Type of change
Please delete options that are not relevant.
Screenshots
Please attach before and after screenshots of the change if applicable.
Checklist:
pre-commit
checks withpre-commit run --all-files
(seeCONTRIBUTING.md
instructions to set it up)