microsoft / onnxruntime

ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator
https://onnxruntime.ai
MIT License
13.53k stars 2.76k forks source link

[Build] moduleNotfoundError: no module named 'onnxruntime.training' & 'No matching distribution found for onnxruntime-training' #20985

Open rajkamal-007 opened 4 weeks ago

rajkamal-007 commented 4 weeks ago

Describe the issue

While I was trying to deploy the artifacts and run the onnx model on the edge device (Linux OS aarch64) its showing up with the following error: image image

I've followed the instructions for building the onnx runtime from the following link: https://onnxruntime.ai/docs/build/training.html#build-for-on-device-training How to get rid of that error?

I even tried with the commands 'pip install onnxruntime-training'; 'pip3 install onnxruntime-training'; 'pip3.9 install onnx runtime-training' Nothing seems to work!

Urgency

Critical

Target platform

Linux (Am62x)

Build script

git clone --recursive https://github.com/Microsoft/onnxruntime.git cd onnxruntime

./build.sh --config RelWithDebInfo --build_shared_lib --parallel --enable_training_apis

./build.sh --config RelWithDebInfo --build_shared_lib --parallel --enable_training

./build.sh --enable_training --use_dnnl

Error / output

image

image

Visual Studio Version

No response

GCC / Compiler Version

GCC 9.2.1

carzh commented 4 weeks ago

Ah, the commands pip install onnxruntime-training attempts to find the ONNXRuntime Training wheel from PyPi. We no longer upload ONNXRuntime Training packages to PyPi. If you would like to install the stable or nightly package, you can follow the installation directions from here (select Optimize Training -> On-device training -> Linux)

If you've followed the instructions for build, then you've also built a local version of the wheel file. To find it, go to your onnxruntime repository, then go to build/Linux/RelWithDebugInfo/dist and there should be an ONNXRuntime Training wheel file. To install it, run pip install [name of wheel file]

snnn commented 4 weeks ago

We only publish packages for x86_64. Sorry you need to build it from source.

rajkamal-007 commented 4 weeks ago

image image

I have tried to build from source also followed the commands for optimize training, but nothing seems to work.

snnn commented 4 weeks ago

As the error says, please upgrade your cmake. You can get the latest one from cmake.org

rajkamal-007 commented 4 weeks ago

I've upgraded the cmake to 3.29.5, and tried to build using: ++++++++++++++++++++++++ git clone --recursive https://github.com/Microsoft/onnxruntime.git cd onnxruntime ./build.sh --config RelWithDebInfo --build_shared_lib --parallel --enable_training --build_wheel --allow_running_as_root ++++++++++++++++++++++++++ Now its giving me the following error: image

snnn commented 4 weeks ago

Could you show us more logs please?

rajkamal-007 commented 4 weeks ago

Sure image