alnzng opened a new pull request, #525:
URL: https://github.com/apache/flink-agents/pull/525

   <!--
   * Thank you very much for contributing to Flink Agents.
   * Please add the relevant components in the PR title. E.g., [api], 
[runtime], [java], [python], [hotfix], etc.
   -->
   
   <!-- Please link the PR to the relevant issue(s). Hotfix doesn't need this. 
-->
   Linked issue: #xxx
   
   ### Purpose of change
   
   Recently we added `onnxruntime>=1.24.1` requirement for Python 3.11+, but 
`onnxruntime` dropped macOS x86_64 wheel support since `1.24.1` ([release 
notes](https://github.com/Microsoft/onnxruntime/releases/tag/v1.24.1)). 
   
   This cause build failure when Python 3.11+ is built for x86_64:
   ```
   Using CPython 3.11.9 interpreter at: /export/apps/python/3.11/bin/python3
   Creating virtual environment at: .venv
   Resolved 124 packages in 591ms
   warning: `google-auth==2.46.0` is yanked (reason: "incompatibility with 
Python 3.8")
   warning: `numpy==2.4.0` is yanked (reason: "Backward compatibility bug")
   error: Distribution `onnxruntime==1.24.1 @ registry+https://pypi.org/simple` 
can't be installed because it doesn't have a source distribution or wheel for 
the current platform
   
   hint: You're on macOS (`macosx_26_0_x86_64`), but `onnxruntime` (v1.24.1) 
only has wheels for the following platforms: `manylinux_2_27_aarch64`, 
`manylinux_2_27_x86_64`, `manylinux_2_28_aarch64`, `manylinux_2_28_x86_64`, 
`macosx_14_0_arm64`, `win_amd64`; consider adding "sys_platform == 'darwin' and 
platform_machine == 'x86_64'" to `tool.uv.required-environments` to ensure uv 
resolves to a version with compatible wheels
   error: Distribution `onnxruntime==1.24.1 @ registry+https://pypi.org/simple` 
can't be installed because it doesn't have a source distribution or wheel for 
the current platform
   
   hint: You're on macOS (`macosx_26_0_x86_64`), but `onnxruntime` (v1.24.1) 
only has wheels for the following platforms: `manylinux_2_27_aarch64`, 
`manylinux_2_27_x86_64`, `manylinux_2_28_aarch64`, `manylinux_2_28_x86_64`, 
`macosx_14_0_arm64`, `win_amd64`; consider adding "sys_platform == 'darwin' and 
platform_machine == 'x86_64'" to `tool.uv.required-environments` to ensure uv 
resolves to a version with compatible wheels
   error: The wheel filename "*.whl" is invalid: Must have a version
   ```
   
   Since `onnxruntime` is transitive dependency from `chromadb`, I think no 
need to pin minimum version. We can just let `chromadb` pull the compatible 
version.
   
   Changes:
     1. Remove `onnxruntime>=1.24.1` floor for Python 3.11
     2. Broaden `required-environments` from `darwin + arm64` to `darwin` so 
`uv lock` consider all macOS
      architecture
     3. Add `uv lock` step in build script before `uv sync` to make sure 
lockfile is regenerated
   
   ### Tests
   
   <!-- How is this change verified? -->
   
   Run `./tools/build.sh`
   
   ### API
   
   <!-- Does this change touches any public APIs? -->
   
   N / A
   
   ### Documentation
   
   <!-- Do not remove this section. Check the proper box only. -->
   
   - [ ] `doc-needed` <!-- Your PR changes impact docs -->
   - [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-included` <!-- Your PR already contains the necessary 
documentation updates -->


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to