# \[SOLVED\] Have version requirement for PyTorch or ONNX for Relax Frontend?

**URL:** <https://discuss.tvm.apache.org/t/solved-have-version-requirement-for-pytorch-or-onnx-for-relax-frontend/17821>\
**Category:** Questions\
**Created:** [November 1, 2024, 6:15am UTC](https://discuss.tvm.apache.org/t/solved-have-version-requirement-for-pytorch-or-onnx-for-relax-frontend/17821 "2024-11-01T06:15:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ysh329](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/ysh329/32/632_2.png) [@ysh329](https://discuss.tvm.apache.org/u/ysh329)\
**Post date:** [November 1, 2024, 6:15am UTC](https://discuss.tvm.apache.org/t/solved-have-version-requirement-for-pytorch-or-onnx-for-relax-frontend/17821/1 "2024-11-01T06:15:38Z")

</div>

Hi, all, I found there are some failed test cases about frontend when I put new version in my own enviroment. like below:

## ONNX: RuntimeError

My onnx runtime version is: 1.15.1

tests/python/relax/test\_frontend\_onnx.py::test\_mean\_variance\_norm

```auto
> sess.initialize_session(providers, provider_options, disabled_optimizers)
E onnxruntime.capi.onnxruntime_pybind11_state.RuntimeException: [ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Exception during initialization: /onnxruntime_src/onnxruntime/core
/providers/cpu/tensor/mean_variance_normalization.h:116 onnxruntime::MeanVarianceNormalization_1<T>::MeanVarianceNormalization_1(const onnxruntime::OpKernelInfo&) [with T = float] M
eanVarianceNormalization CPU EP only supports NHW and NCHW reduction for axes attribute.

```

 ![image](https://discuss.tvm.apache.org/uploads/default/original/2X/a/ac53990e1ed96290a9204eff83cad836279a6d29.png)

## Torch: AttributeError: ‘Graph’ object has no attribute ‘find\_nodes’

My version: 2.2.1

I found `Graph` of my version’s doc has no method `find_nodes`. And I found that this problem can be bypassed by using graph.nodes to traverse one by one, but it cannot be bypassed in other areas, such as the newly added data structures in the new version.

* * *

**Thus, I wanna know whether have a clear version number, such as torch, onnx, etc.**

---

<div class="post-metadata">

**Author:** ![ysh329](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/ysh329/32/632_2.png) [@ysh329](https://discuss.tvm.apache.org/u/ysh329)\
**Post date:** [November 1, 2024, 7:51am UTC](https://discuss.tvm.apache.org/t/solved-have-version-requirement-for-pytorch-or-onnx-for-relax-frontend/17821/2 "2024-11-01T07:51:45Z")

</div>

Accroding CI files:`docker/install/ubuntu_install_onnx.sh`

```auto
# onnx 1.9 removed onnx optimizer from the main repo (see
# https://github.com/onnx/onnx/pull/2834). When updating the CI image
# to onnx>=1.9, onnxoptimizer should also be installed.
pip3 install \
    onnx==1.12.0 \
    onnxruntime==1.12.1 \
    onnxoptimizer==0.2.7

# torch depends on a number of other packages, but unhelpfully, does
# not expose that in the wheel!!!
pip3 install future

pip3 install \
    torch==2.4.1 \
    torchvision==0.19.1 \
    --extra-index-url https://download.pytorch.org/whl/cpu

```
