Skip to content

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

Open
@rajkamal-007

Description

@rajkamal-007

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

Activity

added
buildbuild issues; typically submitted using template
on Jun 10, 2024
changed the title [Build] moduleNotfoundError: no module named 'onnxruntime.training [Build] moduleNotfoundError: no module named 'onnxruntime.training' on Jun 10, 2024
changed the title [Build] moduleNotfoundError: no module named 'onnxruntime.training' [Build] moduleNotfoundError: no module named 'onnxruntime.training' & 'No matching distribution found for onnxruntime-training' on Jun 10, 2024
carzh

carzh commented on Jun 10, 2024

@carzh
Contributor

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

snnn commented on Jun 10, 2024

@snnn
Member

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

added
trainingissues related to ONNX Runtime training; typically submitted using template
and removed
buildbuild issues; typically submitted using template
on Jun 10, 2024
rajkamal-007

rajkamal-007 commented on Jun 11, 2024

@rajkamal-007
Author

image
image

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

snnn

snnn commented on Jun 11, 2024

@snnn
Member

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

rajkamal-007

rajkamal-007 commented on Jun 11, 2024

@rajkamal-007
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

snnn commented on Jun 11, 2024

@snnn
Member

Could you show us more logs please?

rajkamal-007

rajkamal-007 commented on Jun 11, 2024

@rajkamal-007
Author

Sure
image

github-actions

github-actions commented on Jul 12, 2024

@github-actions
Contributor

This issue has been automatically marked as stale due to inactivity and will be closed in 30 days if no further activity occurs. If further support is needed, please provide an update and/or more details.

added
staleissues that have not been addressed in a while; categorized by a bot
on Jul 12, 2024
Leo5050xvjf

Leo5050xvjf commented on Sep 30, 2024

@Leo5050xvjf

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

Hi, I encountered a similar problem. Have you solved this issue? Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleissues that have not been addressed in a while; categorized by a bottrainingissues related to ONNX Runtime training; typically submitted using template

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

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