Skip to content

Conversation

chriselion
Copy link
Contributor

@chriselion chriselion commented Mar 12, 2020

Proposed change(s)

This fixes a problem that was introduced in #3604. Since the TrainerController.start_learning isn't "closed" when we write the stats, we don't track any time in it. This results in timers that look like

    "total": 43845.636981294956,
    "count": 1,
    "self": 43845.23411354399,
    "children": {
        "run_training.setup": {
            "total": 0.40286775096319616,
            "count": 1,
            "self": 0.40286775096319616
        },
        "TrainerController.start_learning": {
            "total": 0.0,
            "count": 0,
            "self": 0.0,

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

https://jira.unity3d.com/browse/MLA-765 is a bigger-picture change for how to handle this; in the meantime, this moves the writing of timers into learn.py.

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

@chriselion chriselion requested a review from xiaomaogy March 12, 2020 22:11
@xiaomaogy xiaomaogy merged commit b01d2bc into master Mar 12, 2020
@delete-merged-branch delete-merged-branch bot deleted the develop-timers-fix-writing branch March 12, 2020 22:32
@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