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

[bug-fix] Fix crash when demo size is smaller than batch size #3591

Merged
merged 6 commits into from
Mar 9, 2020

Conversation

ervteng
Copy link
Contributor

@ervteng ervteng commented Mar 7, 2020

Proposed change(s)

When we had less demos than batch_size, GAIL was being updated with the maximum demonstration number but the rest of PPO was updated with batch_size elements. This caused an error as all updates happen on the same sess.run call.

SAC was unaffected since reward signals are updated independently of the Policy.

This PR now oversamples the demonstrations so that there is always batch_size elements in the GAIL update.

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

#3385
https://jira.unity3d.com/browse/MLA-616

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

@ervteng ervteng requested review from andrewcoh and chriselion March 7, 2020 02:09
@ervteng ervteng merged commit 2b8630f into master Mar 9, 2020
@delete-merged-branch delete-merged-branch bot deleted the develop-checkdemolength branch March 9, 2020 19:58
@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.

2 participants