Skip to content

Commit

Permalink
Upgrade ONNX to 1.15.0 (#6062)
Browse files Browse the repository at this point in the history
This fixes builds of ONNX on OS X while installing ml-agents.

OS X builds use Xcode by default, and the Xcode compiler defaults to using C++98 mode for C++ ( https://stackoverflow.com/a/21349148 ). This causes errors building protocol buffer libraries, which need to be compiled with support for C++14 or newer ( protocolbuffers/protobuf#12393 (comment) ).

[This ONNX commit](onnx/onnx@a979e75) changes its compilation to use C++14 mode: releases that include this commit (1.15.0 or newer) build with Xcode by default.

ONNX 1.15.0 uses a newer protocol buffer library, so allow newer versions here too.
  • Loading branch information
alex-mccarthy-unity authored Mar 6, 2024
1 parent 66f6b34 commit 6004556
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions com.unity.ml-agents/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ and this project adheres to

#### ml-agents / ml-agents-envs
- Bumped numpy version to >=1.21.2,<1.24.0 (#5997)
- Bumped onnx version to 1.15.0 (#6062)
- Bumped protobuf version to >=3.6,<21 (#6062)

## [3.0.0-exp.1] - 2023-10-09
### Major Changes
Expand Down
2 changes: 1 addition & 1 deletion ml-agents-envs/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def run(self):
"cloudpickle",
"grpcio>=1.11.0,<=1.48.2",
"Pillow>=4.2.1",
"protobuf>=3.6,<3.20",
"protobuf>=3.6,<3.21",
"pyyaml>=3.1.0",
"gym>=0.21.0",
"pettingzoo==1.15.0",
Expand Down
4 changes: 2 additions & 2 deletions ml-agents/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def run(self):
f"mlagents_envs=={VERSION}",
"numpy>=1.21.2,<1.24.0",
"Pillow>=4.2.1",
"protobuf>=3.6,<3.20",
"protobuf>=3.6,<3.21",
"pyyaml>=3.1.0",
"torch>=2.1.1",
"tensorboard>=2.14",
Expand All @@ -72,7 +72,7 @@ def run(self):
"attrs>=19.3.0",
"huggingface_hub>=0.14",
'pypiwin32==223;platform_system=="Windows"',
"onnx==1.12.0",
"onnx==1.15.0",
],
python_requires=">=3.10.1,<=3.10.12",
entry_points={
Expand Down

0 comments on commit 6004556

Please sign in to comment.