Skip to content

Potential dependency conflict with Python requirements.txt #20571

@vepadulano

Description

@vepadulano

Check duplicate issues.

  • Checked for duplicates

Description

On MacOS we see failures in the CI due to:

>>> import onnx
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/onnx/__init__.py", line 131, in <module>
    from onnx import (
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/onnx/compose.py", line 8, in <module>
    from onnx import (
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/onnx/helper.py", line 21, in <module>
    from onnx import _mapping, defs, subbyte
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/onnx/_mapping.py", line 104, in <module>
    np.dtype(ml_dtypes.float4_e2m1fn),
             ^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'ml_dtypes' has no attribute 'float4_e2m1fn'. Did you mean: 'float8_e4m3fn'?

e.g. at https://github.com/root-project/root/actions/runs/19784857964/job/56689905732?pr=20570

The error is due to onnx/onnx#7249 . This was fixed in the latest onnx==1.19.1, but on MacOS nodes (macphsft33 specifically), we have

$: pip freeze
[...]
onnx==1.19.0

We can't simply update to onnx=1.19.1, because the transient update of ml_dtypes is conflicting with the current version of the tensorflow package.

The tensorflow package on the node is version tensorflow==2.16.2. I am not sure if we can "blindly" update all package versions, which would include updating tensorflow as well. According to our own requirements.txt, we have no strict dependency on this package version

tensorflow
, but I am not sure this is true.

Note that this means that currently MacOS will always fail because of the outdated onnx version

@couet @lmoneta please help!

@dpiparo @guitargeek FYI

Reproducer

No need

ROOT version

Any

Installation method

Any

Operating system

MacOS, but probably true for other platforms as well

Additional context

No response

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Issues

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions