Skip to content

Conversation

dongruoping
Copy link
Contributor

@dongruoping dongruoping commented Jun 16, 2021

Proposed change(s)

The argument dest="device" in add_argument() is using a different name than in

class TorchSettings:
    device: Optional[str] = parser.get_default("torch_device")

so it actually always gets None because the key ("torch_device") is not found, not because we set the default to None.

To trigger the issue, changing it to default=cuda and it will still get None by default.

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

@dongruoping dongruoping requested a review from ervteng June 16, 2021 23:32
@dongruoping dongruoping merged commit 5921162 into main Jun 17, 2021
@delete-merged-branch delete-merged-branch bot deleted the develop-argparse-device branch June 17, 2021 22:45
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 18, 2022
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