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
The Python package onnx 1.19.0 has a bug that makes this version unusable:
onnx/onnx#7249
In that case, we have to disable the "TestSofieModels" and
"TestRModelParserPyTorch" tests, which import onnx indirectly via
`torch.onnx`.
We should also consider to require `onnx!=1.19.1` in our
`requirements.txt` in the future, so our users don't face similar
trouble from exporting PyTorch models to onnx. But this should only be
done once we are sure that it can also be installed on macOS without
breaking something else.
Closes#20571.
Copy file name to clipboardExpand all lines: tmva/sofie/test/CMakeLists.txt
+18-4Lines changed: 18 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -109,7 +109,21 @@ endif()
109
109
ROOT_FIND_PYTHON_MODULE(torch)
110
110
ROOT_FIND_PYTHON_MODULE(keras)
111
111
112
-
if (ROOT_TORCH_FOUND)
112
+
113
+
114
+
# onnx 1.19.0 has a bug that makes this version unusable:
115
+
# https://github.com/onnx/onnx/issues/7249
116
+
# In that case, we have to disable the "TestSofieModels" and
117
+
# "TestRModelParserPyTorch" tests, which import onnx indirectly via torch.onnx
118
+
ROOT_FIND_PYTHON_MODULE(onnx)
119
+
if (ROOT_ONNX_FOUND ANDDEFINED ROOT_ONNX_VERSION)
120
+
if(ROOT_ONNX_VERSION VERSION_EQUAL"1.19.0")
121
+
message(WARNING "Found broken onnx version ${ROOT_ONNX_VERSION} (see https://github.com/onnx/onnx/issues/7249). Some TMVA SOFIE tests will be disabled.")
122
+
set(broken_onnx TRUE)
123
+
endif()
124
+
endif()
125
+
126
+
if (ROOT_TORCH_FOUND AND ROOT_ONNX_FOUND ANDNOT broken_onnx)
0 commit comments