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

Make the DecisionRequester public and customizable. #3716

Merged
merged 4 commits into from
Apr 8, 2020

Conversation

surfnerd
Copy link
Contributor

@surfnerd surfnerd commented Apr 1, 2020

Proposed change(s)

Make the DecisionRequest public and add a delegate to its API to allow for logic customization in calling RequestDecision and/or RequestAction.
I chose to use a delegate instead of a virtual method to make it easier for users to implement Agent subclasses. With the delegate, they can keep all of their Agent logic in one class, and easily hook into the EnvironmentStep loop in order to ensure that their calls to RequestAction or RequestDecision are handled in the appropriate step.

This pull request also changes how we handle logging our standalone build. We now collect the standalone build log as an artifact and will cat the log if the build fails or if the verbose flag was set to true.

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

MLA-764

Types of change(s)

  • Code refactor
    - [ ] Bug fix
    - [ ] New feature
    - [ ] 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

@surfnerd surfnerd requested review from vincentpierre and chriselion and removed request for vincentpierre April 1, 2020 21:27
@surfnerd surfnerd self-assigned this Apr 1, 2020
@chriselion
Copy link
Contributor

Looks good, just needs a test.

@surfnerd surfnerd changed the title WIP: Make the DecisionRequester public and customizable. Make the DecisionRequester public and customizable. Apr 7, 2020
@surfnerd surfnerd marked this pull request as ready for review April 7, 2020 05:00
@surfnerd surfnerd requested a review from chriselion April 7, 2020 05:00
@surfnerd surfnerd force-pushed the master-decision-requester-api branch 2 times, most recently from 41fa8ae to b405630 Compare April 8, 2020 06:29
surfnerd added 3 commits April 8, 2020 11:42
… to allow users to customize it's behavior.

- Rename Academy.AgentSetStatus to Academy.AgentPreStep and make it public.
- Fix Unity library cache issues for backwards compatibility tests.
- Collect standalone build and logs to artifacts for standalone build jobs.
- cat standalone build log if the build fails.
- Default verbose to False for standalone build test.
@surfnerd surfnerd force-pushed the master-decision-requester-api branch from f0df718 to ddd206f Compare April 8, 2020 18:43
Copy link
Contributor

@vincentpierre vincentpierre left a comment

Choose a reason for hiding this comment

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

LGTM

@surfnerd surfnerd merged commit fa0b4be into master Apr 8, 2020
@delete-merged-branch delete-merged-branch bot deleted the master-decision-requester-api branch April 8, 2020 19:27
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 15, 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.

3 participants