Skip to content

Upgrade python - #6338

Open
montplaisir wants to merge 18 commits into
developfrom
upgrade-python
Open

montplaisir wants to merge 18 commits into
developfrom
upgrade-python

Conversation

@montplaisir

Copy link
Copy Markdown
Contributor

Proposed change(s)

  • Added support for Python 3.11.x and 3.12.x.
  • Deprecated support for Python 3.10.x.
  • Upgraded to PyTorch 2.13.0.
  • Upgraded numpy, onnx, grpcio and added packaging.

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)

Comment thread ml-agents/setup.py Resolved
@montplaisir
montplaisir marked this pull request as ready for review November 17, 2026 21:28
@montplaisir
montplaisir requested a review from a team as a code owner November 17, 2026 21:28

@u-pr u-pr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Harness Review

Needs changes

The upgrade coordinates Python support, dependency bounds, protocol generation, and CI, but compatibility is inconsistent across the model export paths.

Reviewed commit 0083209

🤖 Helpful? 👍/👎

" 'GridWorldColab.onnx',\n",
" opset_version=9,\n",
" # Use the TorchScript exporter; torch >= 2.9 defaults to dynamo, which needs onnxscript\n",
" dynamo=False,\n",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1

The training notebook’s ONNX export raises TypeError with a supported PyTorch 2.2 installation. torch.onnx.export in PyTorch 2.2 does not accept the dynamo keyword. The notebook skips installation when mlagents already imports, so an existing environment reaches this call without upgrading Torch. export_policy_model already handles older versions by inspecting the export signature. Apply the same signature check here before passing dynamo=False.

🤖 Helpful? 👍/👎

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant