google / google/magika

Relax constraint for onnxruntime for the python package

Open
#928 0 comments 0 reactions 0 assignees View on GitHub
blocked python
Dominant language
Rust
Stars
18.6k
Forks
1.2k
Avg merge
3d 12h
Merged PRs (30d)
20

Description

There is a known limitation in uv that forces us to add a constraint to which onnxruntime version we can use in the python module. At first I thought the limitation was fixed, but that's not the case.

Here is more context so that, when this is fixed on uv size, we remember to relax the onnxruntime constraint.

To reproduce:
```
$ uv init --python 3.9
$ uv add onnxruntime
[...]
error: Distribution `onnxruntime==1.20.1 @ registry+https://pypi.org/simple` can't be installed because it doesn't have a source distribution or wheel for the current platform
```

- Our initial fix: https://github.com/google/magika/issues/801
- The uv issue I opened: https://github.com/astral-sh/uv/issues/9228
- Another uv issue (with which the first one was merged): https://github.com/astral-sh/uv/issues/5182
- uv's fix for the second issue: https://github.com/astral-sh/uv/pull/10046 (Source: https://github.com/astral-sh/uv/issues/5182#issuecomment-2557581214). But it turns out that the fix only addressed the second issue, not mine.
- uv's onnxruntime-related open issue: https://github.com/astral-sh/uv/issues/9425
- uv's tracking issue for the overall problem: https://github.com/astral-sh/uv/issues/9711

Suggestion on how to fix in the meantime: https://github.com/astral-sh/uv/issues/9425#issuecomment-2499089130, which is what we implemented in #926.

Contributor guide

Open the contributing guide

Research direction

Review the interim change in #926 and the linked uv issues, especially uv issue #9425, to determine whether the upstream limitation is fixed. When it is, relax the onnxruntime constraint in the Python package and verify that the uv reproduction with Python 3.9 succeeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.