-
Notifications
You must be signed in to change notification settings - Fork 112
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 gymnasium/gym import #123
Conversation
@@ -3,7 +3,9 @@ | |||
Authors :: Vikash Kumar ([email protected]), Vittorio Caggiano ([email protected]) | |||
================================================= """ | |||
|
|||
from gym.envs.registration import register | |||
# from myosuite.utils.import_utils import import_gym; gym = import_gym(); register=gym.register |
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.
Clean up
@@ -200,17 +200,6 @@ def __init__(self, | |||
self.relief_range = relief_range | |||
self._populate_patches() | |||
|
|||
def flatten_agent_patch(self, qpos): |
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.
Seems like throughout this file, we are overwriting newer commits. Be careful here.
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.
@P-Schumacher can we have your feedback on this ?
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.
Just mark "Done" against the comments. Im hopping on a flight. Can take another pass later tonight if I manage to land today :P
myosuite/tests/test_tutorials.sh
Outdated
@@ -22,7 +23,9 @@ declare -a StringArray=( | |||
"2_Load_policy.ipynb" \ | |||
"3_Analyse_movements.ipynb" \ | |||
# "4_Train_policy.ipynb" \ |
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.
Some of the tutorials are commented out. Let's make sure they pass CIs
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.
@vikashplus the mjrl is broken. Can you please check what is not working?
@P-Schumacher the Deprl tutorial is broken. Can you please check it?
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.
removed commented legacy solution
myosuite/utils/__init__.py
Outdated
class gym(): pass | ||
|
||
# https://stackoverflow.com/questions/21434332/how-to-extend-inheritance-a-module-in-python | ||
for i in gg.__all__ + ['__version__', 'envs', 'utils', 'spaces']: |
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.
@Vittorio-Caggiano -- I'm curious why you are explicitly adding ['envs', 'utils', 'spaces']
. Aren't they present by default? Maybe I'm missing something.
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.
__all__
gets only the variables but the modules are not provided. Those modules are the ones specifically needed for myosuite.
Actually, a more comprehensive solution could be to add all modules with something like:
[m[0] for m in inspect.getmembers(gg, predicate=inspect.ismodule)]
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.
I believe I have found a much cleaner answer. Giving it a try now. Will update in sometime
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.
Got it working. See this commit - vikashplus/robohive@1052b24
@@ -287,14 +287,15 @@ def register_env_with_variants(id, entry_point, max_episode_steps, kwargs): | |||
# Gait Torso Reaching ============================== | |||
from myosuite.physics.sim_scene import SimBackend | |||
sim_backend = SimBackend.get_sim_backend() |
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.
is this still needed? (it doesn't seem to be used)
c47c536
to
0c31ed9
Compare
This PR adds: