[ONNX] Bump onnx and onnxscript versions in CI (#146097)

Bump onnx onnxscript==0.1 in CI; Skipped onnxruntime 1.19 because it has regression on avgpool.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/146097
Approved by: https://github.com/malfet
This commit is contained in:
Justin Chu 2025-02-05 21:00:23 +00:00 committed by PyTorch MergeBot
parent 9da376daa6
commit 1f6b566d74
3 changed files with 6 additions and 5 deletions

View file

@ -31,8 +31,8 @@ pip_install \
pip_install coloredlogs packaging
pip_install onnxruntime==1.18.1
pip_install onnx==1.16.2
pip_install onnxscript==0.1.0.dev20241124 --no-deps
pip_install onnx==1.17.0
pip_install onnxscript==0.1.0 --no-deps
# required by onnxscript
pip_install ml_dtypes

View file

@ -339,7 +339,7 @@ onnx==1.17.0
#Pinned versions:
#test that import:
onnxscript==0.1.0.dev20240817
onnxscript==0.1.0
#Description: Required by mypy and test_public_bindings.py when checking torch.onnx._internal
#Pinned versions:
#test that import:

View file

@ -150,8 +150,9 @@ def _retrieve_or_adapt_input_to_graph_set(
# scalars are promoted to tensors with shape (1,).
with onnxscript.evaluator.default_as(tracer):
element_value = onnxscript_apis.torchlib_opset().Reshape(
element_value, [1]
) # type: ignore[arg-type, type-var]
element_value, # type: ignore[arg-type, type-var]
[1], # type: ignore[arg-type, type-var]
)
sequence_mixed_elements.append(element_value)
elif isinstance(tensor, int):
# NOTE: op.Concat doesn't support scalar, so we need to wrap it with