-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 hybrid action staging #4702
Conversation
Co-authored-by: Ervin T <ervin@unity3d.com> Co-authored-by: Vincent-Pierre BERGES <vincentpierre@unity3d.com>
Co-authored-by: Ervin T <ervin@unity3d.com> Co-authored-by: Vincent-Pierre BERGES <vincentpierre@unity3d.com>
* Add hybrid action capability flag (#4576) * Change BrainParametersProto to support ActionSpec (#4579) * Assign new BrainParametersProto fields based on capabilities (#4581) * ActionBuffer with hybrid actions for RemotePolicy (#4592) * Barracuda inference for hybrid actions (#4611) * Refactor BarracudaModel loader checks (#4629) * Export separate nodes for continuous/discrete actions (#4655) * Separate continuous/discrete actions in AgentActionProto (#4698) * Force different nodes for new and deprecated action output (#4705)
* clean up docs on actions, code examples, reference to hybrid * undo change from other branch * Update docs/Python-API.md Co-authored-by: andrewcoh <54679309+andrewcoh@users.noreply.github.com> * Update docs/Python-API.md Co-authored-by: andrewcoh <54679309+andrewcoh@users.noreply.github.com> * Update docs/Python-API.md Co-authored-by: andrewcoh <54679309+andrewcoh@users.noreply.github.com> * Update docs/Python-API.md Co-authored-by: andrewcoh <54679309+andrewcoh@users.noreply.github.com> * cleanup Co-authored-by: andrewcoh <54679309+andrewcoh@users.noreply.github.com>
has_nan = np.isnan(d) | ||
if has_nan: | ||
raise RuntimeError("Continuous NaN action detected.") | ||
d = np.sum(action.discrete) |
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.
action.discrete is int32's right? I don't think we need to check them for NaNs
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.
(OK to do after merging to master)
- Actions can either use `Discrete` or `Continuous` spaces. | ||
- When using `Discrete` it is possible to assign multiple action branches, and | ||
to mask certain actions. | ||
- Agents can either use `Discrete` or `Continuous` actions. |
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.
- Agents can either use `Discrete` or `Continuous` actions. | |
- Agents can use `Discrete` and/or `Continuous` actions. |
action. For example : In a game direction input (no movement, left, right) and | ||
- `action_spec` is an `ActionSpec` namedtuple that defines the number and types | ||
of actions for the Agent. | ||
|
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.
#### ActionSpec |
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.
Changelog hasn't been updated yet.
I'll update in a subsequent PR. |
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.
Proposed change(s)
Hybrid Actions staging branch
To merge in before it is ready to merge into master:
ActionTupleActionModelC#TODO:
Merge masterAddressing clipped actions was non-trivial. Please look at how ActionInfo and clipping in the torch policy has changed.Fix GAIL simple RL (after C#)(GAIL tests passed but still using demonstrations with old proto fields)DocsUseful links (Github issues, JIRA tickets, ML-Agents forum threads etc.)
Types of change(s)
Checklist
Other comments