-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Develop new ll api #3022
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
Develop new ll api #3022
Conversation
specific agent | ||
""" | ||
try: | ||
agent_index = np.where(self.agent_id == agent_id)[0][0] |
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 do you think about having an agent_id -> index dictionary, but only building it the first time get_agent_step_result() is called? I'm worried that this is O(num agents) per call, and if you're using this once, you'll probably use it (num agents) times.
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 am unsure since BatchedStepResponse
is a namedtuple, I do not think I can have references to dicts in there.
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.
You definitely can have a reference (it's python! everything is a reference!) but I forget how to have a default value like this. If you think it would be useful I'll look into 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.
Made it an object for now. We can see if we really need it to be a named tuple.
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.
Thanks. If you really want to prematurely optimize things, you can start adding __slots__
to classes...
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.
Co-Authored-By: Chris Elion <chris.elion@unity3d.com>
* LL-API documentation changes * fixes * deleting implementation details * Update docs/Python-API.md Co-Authored-By: Chris Elion <chris.elion@unity3d.com> * edited the migrating docs * Update docs/Migrating.md Co-Authored-By: Chris Elion <chris.elion@unity3d.com>
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.
Over all this PR looks good to me, but since it's rather large it would be good to hear some idea of what cases you've tested. Have you retrained all scened using cloud training for this branch? Have you tested it on Windows?
one agent in the simulation sends its observations to Python again. Since | ||
Agents can request decisions at different frequencies, a simulation step does | ||
not necessarily correspond to a fixed simulation time increment. | ||
Changes from ML-Agents v0.11 : |
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.
Minor but is this a good place for a changelist? I worry it will become out of date quickly
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 put this here because it is major change but I can remove it.
I have not tested on windows, will do.
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.
- windows
- cloud (looking at some of the logs generated, the training seems to be going fine)
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.
+1 for cloud training |
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 long as cloud runs seem OK,
Todo : Documentation changes in other PR #3042