-
Notifications
You must be signed in to change notification settings - Fork 350
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
[Feature] Add env wrapper for Unity MLAgents #2469
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/rl/2469
Note: Links to docs will display an error until the docs builds have been completed. ❌ 15 New Failures, 6 Unrelated FailuresAs of commit dd93644 with merge base f411f93 ( NEW FAILURES - The following jobs have failed:
BROKEN TRUNK - The following jobs failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
1ff34a4
to
0be3440
Compare
0be3440
to
39cf600
Compare
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.
That looks amazing!
Can you share a bit about the current limitations (eg, are the specs expected to be fixed?) and some context about the tests - I see a couple of mocks and pytest marks
|
||
@pytest.mark.unity_editor | ||
def test_with_editor(self): | ||
print("Please press play in the Unity editor") # noqa: T201 |
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.
what's 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.
When UnityMLAgentsEnv
is not given a path to a file or the name of a registered env, it waits for the user to press the play button in the unity editor or run a mlagents-compatible binary. Since we can't easily do that in CI, I figured we can just skip the test by default. To run the test, the cmd line arg --unity_editor
has to be given. We could remove this test, but I found it useful while working on this PR to have a test that connects to whichever environment I have open in the unity editor
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.
gotcha!
1fd36a0
to
0a84b47
Compare
Current limitations are:
For the tests:
|
0a84b47
to
dd93644
Compare
Description
Adds
UnityMLAgentsWrapper
andUnityMLAgentsEnv
environment wrapper classes to control MLAgents environments from TorchRL.Motivation and Context
close #1110
Types of changes
What types of changes does your code introduce? Remove all that do not apply:
Checklist
Go over all the following points, and put an
x
in all the boxes that apply.If you are unsure about any of these, don't hesitate to ask. We are here to help!