Skip to content

build: enable Python 3.12 support and relax core dependency bounds#7821

Open
pritamdodeja wants to merge 6 commits intotensorflow:masterfrom
pritamdodeja:tfx-py312-1.17dev-e
Open

build: enable Python 3.12 support and relax core dependency bounds#7821
pritamdodeja wants to merge 6 commits intotensorflow:masterfrom
pritamdodeja:tfx-py312-1.17dev-e

Conversation

@pritamdodeja
Copy link
Copy Markdown
Contributor

This commit modernizes the TFX orchestrator to support Python 3.12, while relaxing dependency constraints to allow the use of locally compiled component wheels (version 1.17.0 and 1.18.0).

Specific changes include:

  • pyproject.toml: Updated requires-python to allow versions up to 3.12 (range changed from <3.11 to <3.13).
  • pyarrow: Removed the <11 upper bound constraint. This allows modern Arrow versions (e.g., 14+) to be used, avoiding legacy build failures on Python 3.12.
  • Dependency Alignment: Expanded version ranges in tfx/dependencies.py for ml-metadata, tfx-bsl, tfdv, tfma, and tft. These now allow version 1.17.0 to resolve, preventing Pip from backtracking into incompatible legacy distributions during installation.

This commit modernizes the TFX orchestrator to support Python 3.12,
while relaxing dependency constraints to allow the use of locally compiled
component wheels (version 1.17.0 and 1.18.0).

Specific changes include:
* pyproject.toml: Updated `requires-python` to allow versions up to 3.12
  (range changed from <3.11 to <3.13).
* pyarrow: Removed the `<11` upper bound constraint. This allows modern
  Arrow versions (e.g., 14+) to be used, avoiding legacy build failures
  on Python 3.12.
* Dependency Alignment: Expanded version ranges in `tfx/dependencies.py`
  for ml-metadata, tfx-bsl, tfdv, tfma, and tft. These now allow version
  1.17.0 to resolve, preventing Pip from backtracking into incompatible
  legacy distributions during installation.
@keerthanakadiri
Copy link
Copy Markdown

Hi @pritamdodeja, Can you kindly resolve the conflicts? Thank you!

@pritamdodeja
Copy link
Copy Markdown
Contributor Author

Hi @pritamdodeja, Can you kindly resolve the conflicts? Thank you!

Hello @keerthanakadiri I will work on it this weekend.

Pritam

@pritamdodeja
Copy link
Copy Markdown
Contributor Author

pritamdodeja commented Mar 31, 2026

@keerthanakadiri apologies for the delay, I was finally able to get to this. I had to remove tensorflowjs in order for tests to run. I think that has a dependency on tensorflow decision forests, which doesn't have a release for 3.12. My test summary for components looks like the following:

============ 39 failed, 430 passed, 67 skipped, 9 xfailed, 98 warnings in 864.61s (0:14:24) =============

I'm going to run a broader test and see where I get. I see unit tests failing in GitHub. I need to re-produce the issue locally to understand how I can get clean runs. I'd appreciate any advice you have on this front.

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