You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add torch version constraint to be equal or less than 2.8.0 to prevent breaking onnx changes in torch 2.9.0 (#6251)
* Pin torch version to 2.8.0 to prevent breaking onnx changes in 2.9.0
The ` 2.9.0` version results in an issue finding `onnxscript`. Pinning the `2.8.0` prevent this error.
I'm not exactly of the exact root cause but it seems there were some backwards incompatible changes to onnx: https://github.com/pytorch/pytorch/releases/tag/v2.9.0#backwards-incompatible-changes.
Stack trace on exiting training:
```
File "C:\Users\Samuel\miniconda3\envs\mlagents\lib\site-packages\mlagents\trainers\torch_entities\model_serialization.py", line 164, in export_policy_model
torch.onnx.export(
File "C:\Users\Samuel\miniconda3\envs\mlagents\lib\site-packages\torch\onnx\__init__.py", line 282, in export
from torch.onnx._internal.exporter import _compat
File "C:\Users\Samuel\miniconda3\envs\mlagents\lib\site-packages\torch\onnx\_internal\exporter\_compat.py", line 16, in <module>
from torch.onnx._internal.exporter import (
File "C:\Users\Samuel\miniconda3\envs\mlagents\lib\site-packages\torch\onnx\_internal\exporter\_core.py", line 18, in <module>
import onnxscript
ModuleNotFoundError: No module named 'onnxscript'
```
* Add torch version constraint to be equal or less than 2.8.0
Previously commit forced only 2.8.0, however adding this constraint is a bit nicer, as I see in some of installation docs sometimes torch 2.2.0 is installed: https://github.com/Unity-Technologies/ml-agents/blob/release_22_docs/docs/Installation.md.
* Update CHANGELOG.md
0 commit comments