Skip to content
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

C# changes for hybrid action spaces #4587

Merged

Conversation

dongruoping
Copy link
Contributor

Proposed change(s)

C# changes for hybrid action spaces

Useful links (Github issues, JIRA tickets, ML-Agents forum threads etc.)

Types of change(s)

  • Bug fix
  • New feature
  • Code refactor
  • Breaking change
  • Documentation update
  • Other (please describe)

Checklist

  • Added tests that prove my fix is effective or that my feature works
  • Updated the changelog (if applicable)
  • Updated the documentation (if applicable)
  • Updated the migration guide (if applicable)

Other comments

BrainName = name,
IsTraining = isTraining
};
if (bp.VectorActionDescriptions != null)
{
brainParametersProto.VectorActionDescriptions.AddRange(bp.VectorActionDescriptions);
brainParametersProto.VectorActionDescriptionsDeprecated.AddRange(bp.VectorActionDescriptions);
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I don't think we should deprecate ActionDescriptions (unless we're replacing them with more specific ContinuousActionDescriptions , etc). We don't currently use them, but I think they will be helpful for debugging in the future, especially now that we can have multiple actuators and action types.

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 changed this because we won't use it anywhere other than deprecated cases since it's for VectorAction, and if we ever need a description we should add Continuous(/Discrete)ActionDescriptions

Copy link
Contributor

@chriselion chriselion left a comment

Choose a reason for hiding this comment

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

Looks good. I want to do a pass before we merge to master on a few things like the error messages, and whether we want "hybrid" to be the actual user-facing name. But that shouldn't block this for now.

/// The Barracuda engine model for loading static parameters.
/// </param>
/// <returns>True if the model uses deprecated output fields.</returns>
public static bool UseDeprecated(this Model model)
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if this is future proof. There will be some more deprecations in the future. Maybe using a model version or calling this NoHybridSupport?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed, but don't like the negative term. I changed it to HasHybridSupport().

@delete-merged-branch delete-merged-branch bot deleted the branch develop-hybrid-action-staging December 3, 2020 21:30
* separate entries for continuous/discrete in action proto

* store actions in AgentInfo as ActionBuffers instead of arrays
@dongruoping dongruoping changed the base branch from develop-hybrid-actions-singleton to develop-hybrid-action-staging December 3, 2020 21:40
@dongruoping dongruoping force-pushed the develop-hybrid-actions-csharp branch from 2244680 to ea6393b Compare December 3, 2020 22:38
@dongruoping dongruoping changed the base branch from develop-hybrid-action-staging to develop-hybrid-actions-singleton December 3, 2020 23:46
@dongruoping dongruoping changed the base branch from develop-hybrid-actions-singleton to develop-hybrid-action-staging December 4, 2020 01:04
@dongruoping dongruoping merged commit a31fd6d into develop-hybrid-action-staging Dec 4, 2020
@delete-merged-branch delete-merged-branch bot deleted the develop-hybrid-actions-csharp branch December 4, 2020 23:50
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 5, 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.

5 participants