Skip to content

feat(python-ml-dtypes): import component, tensorflow dependency - #19017

Draft
binujp wants to merge 1 commit into
4.0from
bphilip/python-ml-dtypes
Draft

binujp wants to merge 1 commit into
4.0from
bphilip/python-ml-dtypes

Conversation

@binujp

@binujp binujp commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Import python-ml-dtypes, pinned to Fedora rawhide (no f43 branch exists yet for this package; only f45/rawhide). One of the TensorFlow Python dependencies identified in the tensorflow-azurelinux build plan.

Fedora's %prep pins setuptools >= 80.9, but azl4's python-setuptools is 78.1.1. ml_dtypes does not need a setuptools >=80.9-only feature. We loosen the pin via overlay to >= 78.1. This lets us work off Fedora dist-git. Upgrading setuptools is a very heavy lift and not recommended.

With setuptools version reverted, the build still needs patching to work around failures due to dependencies. At some point when we are able to upgrade setuptools this workaround can be dropped.

Verified: smoke-tested python3-ml-dtypes in a mock chroot (float8_e4m3fn conversions, bfloat16 array creation).

Import python-ml-dtypes, pinned to Fedora rawhide (no f43 branch exists
yet for this package; only f45/rawhide). One of the TensorFlow Python
dependencies identified in the tensorflow-azurelinux build plan.

Fedora's %prep pins setuptools >= 80.9, but azl4's python-setuptools is
78.1.1. ml_dtypes does not need setuptools >=80.9-only feature. We loosen
the pin via overlay to >= 78.1. This lets us work off fedora dist-git.
Upgrading setuptools is a very heavy lift and not recommended.

With setuptools version reverted, the build still needs patching to work
around failures due to dependencies. At some point when we are able to
upgrade setuptools this workaround can be dropped.

Verified: smoke-tested python3-ml-dtypes in a mock chroot (float8_e4m3fn
conversions, bfloat16 array creation).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 83703b8a-3378-491b-88d0-6b29aabc7827
Copilot AI balanced review requested due to automatic review settings October 2, 2026 05:10
@binujp

binujp commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
2 pipeline(s) were filtered out due to trigger conditions.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The setuptools overlay lacks the mandatory category and upstream-status metadata.

Review effort: Balanced
Findings: 2 Low severity

Open (2)
What changed in this PR

Imports python-ml-dtypes as a TensorFlow dependency with Azure Linux compatibility adjustments.

Changes:

  • Pins the Fedora Rawhide component and lowers its setuptools requirement.
  • Adds Eigen 3.4.0 compatibility and NumPy test patches.
  • Adds the lock and rendered RPM sources/spec.
File Description
base/​comps/​python-ml-dtypes/​python-ml-dtypes.comp.toml Defines the component and overlays.
base/​comps/​python-ml-dtypes/​0001-float8-add-eigen-numext-get_integer_by_size-shim.patch Adds the Eigen compatibility shim.
locks/​python-ml-dtypes.lock Pins upstream resolution.
specs/​p/​python-ml-dtypes/​python-ml-dtypes.spec Provides the rendered RPM spec.
specs/​p/​python-ml-dtypes/​sources Records the source archive checksum.
specs/​p/​python-ml-dtypes/​04c4dc8b23720d9d92f3cc849ffc387d5798db84.patch Backports the NumPy test fix.
specs/​p/​python-ml-dtypes/​0001-float8-add-eigen-numext-get_integer_by_size-shim.patch Provides the rendered compatibility patch.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.


# Fedora's %prep pins the pyproject.toml build-system requirement to
# setuptools >= 80.9. AZL4 has 78.1.1 and an upgrade is not feasible.
# ml_dtypes' is not an actual feature requirement, we can loosen it.
Comment on lines +9 to +14
[[components.python-ml-dtypes.overlays]]
description = "Loosen setuptools pin from >=80.9 to >=78.1 to match; ml_dtypes does not use setuptools >=80.9-only feature"
type = "spec-search-replace"
section = "%prep"
regex = '^sed -i .s/"setuptools\.\*",/"setuptools >= 80\.9",/g. pyproject\.toml$'
replacement = "sed -i 's/\"setuptools.*\",/\"setuptools >= 78.1\",/g' pyproject.toml"

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants