Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rajkamal-007 opened this issue Jun 10, 2024 · 7 comments
Labels
training issues related to ONNX Runtime training; typically submitted using template

Comments

@rajkamal-007
Copy link

rajkamal-007 commented Jun 10, 2024

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

@rajkamal-007 rajkamal-007 added the build build issues; typically submitted using template label Jun 10, 2024
@rajkamal-007 rajkamal-007 changed the title [Build] moduleNotfoundError: no module named 'onnxruntime.training [Build] moduleNotfoundError: no module named 'onnxruntime.training' Jun 10, 2024
@rajkamal-007 rajkamal-007 changed the title [Build] moduleNotfoundError: no module named 'onnxruntime.training' [Build] moduleNotfoundError: no module named 'onnxruntime.training' & 'No matching distribution found for onnxruntime-training' Jun 10, 2024
@carzh
Copy link
Contributor

carzh commented Jun 10, 2024

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
Copy link
Member

snnn commented Jun 10, 2024

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

@snnn snnn added training issues related to ONNX Runtime training; typically submitted using template and removed build build issues; typically submitted using template labels Jun 10, 2024
@rajkamal-007
Copy link
Author

image
image

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

@snnn
Copy link
Member

snnn commented Jun 11, 2024

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

@rajkamal-007
Copy link
Author

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
Copy link
Member

snnn commented Jun 11, 2024

Could you show us more logs please?

@rajkamal-007
Copy link
Author

Sure
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
training issues related to ONNX Runtime training; typically submitted using template
Projects
None yet
Development

No branches or pull requests

3 participants