Skip to content

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

Merged
merged 30 commits into from
Dec 9, 2019
Merged

Develop new ll api #3022

merged 30 commits into from
Dec 9, 2019

Conversation

vincentpierre
Copy link
Contributor

@vincentpierre vincentpierre commented Dec 4, 2019

Todo : Documentation changes in other PR #3042

@vincentpierre vincentpierre self-assigned this Dec 4, 2019
@vincentpierre vincentpierre marked this pull request as ready for review December 5, 2019 00:01
@vincentpierre vincentpierre requested review from chriselion, harperj and ervteng and removed request for chriselion December 5, 2019 00:03
@vincentpierre vincentpierre changed the base branch from develop to master December 5, 2019 19:19
specific agent
"""
try:
agent_index = np.where(self.agent_id == agent_id)[0][0]
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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...

Copy link
Contributor

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>
chriselion
chriselion previously approved these changes Dec 9, 2019
* 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>
chriselion
chriselion previously approved these changes Dec 9, 2019
Copy link
Contributor

@harperj harperj left a 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 :
Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor Author

@vincentpierre vincentpierre Dec 9, 2019

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)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screen Shot 2019-12-09 at 2 35 45 PM
Looks like it is working

@ervteng
Copy link
Contributor

ervteng commented Dec 9, 2019

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?

+1 for cloud training

Copy link
Contributor

@ervteng ervteng left a 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, :shipit:

@vincentpierre vincentpierre merged commit d92f528 into master Dec 9, 2019
@delete-merged-branch delete-merged-branch bot deleted the develop-new-ll-api branch December 9, 2019 23:58
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants