Skip to content

Conversation

dongruoping
Copy link
Contributor

@dongruoping dongruoping commented Mar 4, 2021

Proposed change(s)

A bug in PyTorch with python 3.9 (see thread) cause a segmentation fault at python finalization on Linux. The issue is fixed in pytorch 1.8.

Upgrade pytorch dependency to 1.8 for python 3.9 and run pytests with different versions of python and pytorch.

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 changed the title [DO NOT MERGE] pytest debug Upgrade PyTorch version for python 3.9 Mar 10, 2021
# Windows ver. of PyTorch doesn't work from PyPi. Installation:
# https://github.com/Unity-Technologies/ml-agents/blob/main/docs/Installation.md#windows-installing-pytorch
'torch>=1.6.0,<1.8.0;platform_system!="Windows"',
"torch>=1.8.0,<1.9.0;(platform_system!='Windows' and python_version>='3.9')",
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add a comment about torch only working on py3.9 for 1.8.0 and above (and link to the issue)

@dongruoping
Copy link
Contributor Author

last commit only contains change for comment. skipping the test.

@dongruoping dongruoping merged commit 65d1983 into main Mar 11, 2021
@delete-merged-branch delete-merged-branch bot deleted the python-3.9-tests-segfault branch March 11, 2021 02:34
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 11, 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