Skip to content

[Python] Run Dataflow TFT benchmark tests on Python 3.11 to avoid protobuf resolution clash - #40333

Merged
tvalentyn merged 1 commit into
apache:masterfrom
stankiewicz:tft_py_bump
Sep 29, 2026
Merged

tvalentyn merged 1 commit into
apache:masterfrom
stankiewicz:tft_py_bump

Conversation

@stankiewicz

@stankiewicz stankiewicz commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #39667

Description

This PR updates dataflow_cloudml_benchmark_tests_py_versions in sdks/python/test-suites/gradle.properties from 3.10 to 3.11.

Background & Root Cause

The Dataflow TensorFlow Transform benchmark suite (:sdks:python:test-suites:dataflow:tftTests) experienced a worker startup and execution regression (sdk boot latency ballooned from ~1.5 minutes to ~6 minutes).

Investigation of worker startup logs revealed a pip dependency resolution conflict triggered by cloudml/requirements.txt:

  1. Mutually Exclusive Protobuf Range on Python 3.10:
    • tensorflow-metadata==1.21.0 (required by tfx_bsl and tensorflow-transform) contains a Python <3.11-specific constraint:
      protobuf<=6.32;python_version<"3.11".
    • Beam master recently bumped google-cloud-bigtable to >=2.42.0, which strictly requires protobuf>=6.33.5.
    • On Python 3.10, these ranges do not overlap.
  2. Pip Backtracking & On-Worker Compilation:
    • Pip rejects the pre-installed Beam master build and resolves the conflict by temporarily downloading apache-beam==2.75.0 and downgrading pyarrow to 23.0.1.
    • Right after, Gradle's staged --extra_package (apache-beam.tar.gz) forces a reinstall of master code, which compiles all Cython/C++ extensions from source directly on the worker VM. This alone consumes over 4 minutes of 100% CPU on each worker before the harness can even start.

Solution

In tensorflow-metadata==1.21.0's setup.py, the protobuf constraint for Python 3.11+ has no upper bound:

'protobuf>=4.25.2;python_version>="3.11"'

@stankiewicz

Copy link
Copy Markdown
Contributor Author

R: @tvalentyn

@github-actions

Copy link
Copy Markdown
Contributor

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment assign set of reviewers

@tvalentyn

Copy link
Copy Markdown
Contributor

thanks!

@tvalentyn
tvalentyn merged commit 2b35850 into apache:master Sep 29, 2026
102 of 103 checks passed
@stankiewicz
stankiewicz deleted the tft_py_bump branch October 13, 2026 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Performance Regression or Improvement: test_cloudml_benchmark_criteo_10GB-runtime_sec:runtime_sec

2 participants