-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Support Numpy v2.0 #21063
Comments
## Description of changes *Summarize the changes made by this PR.* - Improvements & Bug fixes - Numpy 2.0 has some type changes which break our code. This was flagged by @itayB in #2352 (Thank you!). We need to extend that PR a bit to include other requirements for the thin client, as well as the pyproject.toml. - Note: We could fix these type issues but Onnxruntime does not yet support python 2.0 - which we depend on (microsoft/onnxruntime#21063) - New functionality - None ## Test plan *How are these changes tested?* - [x] Tests pass locally with `pytest` for python, `yarn test` for js, `cargo test` for rust ## Documentation Changes We may want to update our docs? I am not sure what makes sense here - input solicited.
I got the same error:
The error is from this line. The compiler never evaluates the code. I'm running a Docker container built on an AWS Lambda image with I'm guessing things are being changed right now because I could not build for a while, but now it's building and I'm getting the same error. |
It is not enough. After this change we still see the error:
I am trying to understand the sentence. How to support NumPy 1.x while we use NumPy 2.0 at compile time? It sounds like there is a compile time macro we should use. |
@mszhanyi, please help take a look |
I'm also still getting the same error. Here's the stack trace:
|
### Description Upgrade pybind11 to the latest as suggested by @gnought in microsoft#21063 ### Motivation and Context Recently numpy released a new version, which caused compatibility issue between the latest numpy version and the latest ONNX Runtime version.
I published the new packages to our nightly feed. It would be great if you can help me do some tests. python -m pip install coloredlogs flatbuffers numpy packaging protobuf sympy
python -m pip install -i https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ORT-Nightly/pypi/simple/ ort_nightly==1.19.0.dev20240619002 Please note the version number should be |
[detailed] - This is to avoid an error coming from ONNXRuntime due to incompatible NumPY versions. Should be reverted once microsoft/onnxruntime#21063 is fixed.
how is it going? |
We are discussing whether the upcoming 1.18.1 release should be built with Numpy 2.0 or staying with numpy 1.x and mark the package as incompatible with numpy 2.0 in its requirements.txt. |
I anticipate the problem will be addressed in our nightly build in a few days. There is an open PR for this: #21085 |
But if I compile it manually, is it compatible? |
…a-core#2360) ## Description of changes *Summarize the changes made by this PR.* - Improvements & Bug fixes - Numpy 2.0 has some type changes which break our code. This was flagged by @itayB in chroma-core#2352 (Thank you!). We need to extend that PR a bit to include other requirements for the thin client, as well as the pyproject.toml. - Note: We could fix these type issues but Onnxruntime does not yet support python 2.0 - which we depend on (microsoft/onnxruntime#21063) - New functionality - None ## Test plan *How are these changes tested?* - [x] Tests pass locally with `pytest` for python, `yarn test` for js, `cargo test` for rust ## Documentation Changes We may want to update our docs? I am not sure what makes sense here - input solicited.
onnxruntime 1.18.1 is published.
|
Yes. |
Why this problem still apear, if I use numpy in the sql server maschine Learning. |
done! Compiled and working, thank you |
If you need to use ONNX Runtime with NumPy 2.0, please get a nightly package by using the following commands:
|
I use Python and numpy inside the SQL Server. Put I got this error if I use the newest Numpy |
Hi, |
It's a little confusing that this issue was closed as complete before the version of ONNX Runtime that supports NumPy 2.0 has actually made its way to PyPI. Currently it is only available as a nightly package. How are we to track the progress of it being released officially, and what is the expected ETA? |
you can compile from the main using the documents on the page web |
I used this and still get the error on the sql server if i try to use Python on it. |
Which ONNX Runtime did you install? Can you run "python3 -m pip list | grep ^o" and give us the output? |
No it works, thanks man. |
Any updates here? Having |
I think this issue can be closed now, as |
Describe the issue
I am using Numpy v2.0.
onnxruntime gives an incompatible error
Is it possible to upgrade pybind 11>=2.12 in
onnxruntime/cmake/deps.txt
Line 51 in 0babc33
to
To reproduce
a simple python imports
Urgency
No response
Platform
Mac
OS Version
14.5
ONNX Runtime Installation
Released Package
ONNX Runtime Version or Commit ID
1.18.0
ONNX Runtime API
Python
Architecture
ARM64
Execution Provider
Default CPU
Execution Provider Library Version
No response
The text was updated successfully, but these errors were encountered: