-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit 631901b
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.md1 parent d1147c1 commit 631901b
2 files changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | + | ||
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | - | ||
65 | + | ||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
0 commit comments