Skip to content

Fix tf-text OSS nightly and presubmit builds against current tf-nightly. - #1571

Open
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_1000522266
Open

copybara-service[bot] wants to merge 1 commit into
masterfrom
test_1000522266

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Fix tf-text OSS nightly and presubmit builds against current tf-nightly.

  1. When IS_NIGHTLY=nightly, oss_scripts/configure.sh runs bazel run //oss_scripts/pip_package:requirements.update -- --upgrade (pip-compile) on @release_or_nightly//:requirements.in. Because tf-keras-nightly on PyPI currently declares Requires-Dist: tf-nightly~=2.21.0.dev (with no other dependencies), pip-compile downgrades tf-nightly from 2.23.0.dev back to 2.21.0.dev20260203 (Feb 2026). Subsequent prepare_tf_dep.sh then pins @org_tensorflow in WORKSPACE to that Feb 2026 commit, which predates @rules_cc in tf_workspace3() and breaks the build with Failed to load Starlark extension '@@rules_cc//cc:extensions.bzl'.
    • Exclude tf-keras from @release_or_nightly//:requirements.in in py_deps_profile.bzl (while keeping the @release_or_nightly//:tf_keras_pkg target alias and adding IS_NIGHTLY to environ).
    • Persist HERMETIC_PYTHON_VERSION and IS_NIGHTLY via build --repo_env in oss_scripts/configure.sh and append the latest tf-keras-nightly pin and sha256 hash from PyPI directly to requirements_lock_<py>.txt after requirements.update so pip_parse still populates @pypi_tf_keras_nightly.
  2. Add common --features=-external_include_paths and common --host_features=-external_include_paths in oss_scripts/configure.sh (matching TensorFlow master's .bazelrc) so TFLite targets (@@org_tensorflow//tensorflow/compiler/mlir/lite/schema:schema_utils) build cleanly with the updated rules_ml_toolchain when prepare_tf_dep.sh pins WORKSPACE to a newer TensorFlow commit than v2.22.0-rc0.
  3. Mark tokenizers_benchmarks and ops_benchmarks with tags = ["manual"] so bazel test tensorflow_text:all does not run them without --benchmark_filter and fail with NO TESTS RAN (exit code 5) under Python 3.12+.

@copybara-service copybara-service Bot changed the title Prevent lagging tf-keras-nightly Requires-Dist from downgrading tf-nightly during requirements.update. Fix tf-text OSS nightly and presubmit builds against current tf-nightly. Oct 16, 2026
1. When `IS_NIGHTLY=nightly`, `oss_scripts/configure.sh` runs `bazel run //oss_scripts/pip_package:requirements.update -- --upgrade` (`pip-compile`) on `@release_or_nightly//:requirements.in`. Because `tf-keras-nightly` on PyPI currently declares `Requires-Dist: tf-nightly~=2.21.0.dev` (with no other dependencies), `pip-compile` downgrades `tf-nightly` from `2.23.0.dev` back to `2.21.0.dev20260203` (Feb 2026). Subsequent `prepare_tf_dep.sh` then pins `@org_tensorflow` in `WORKSPACE` to that Feb 2026 commit, which predates `@rules_cc` in `tf_workspace3()` and breaks the build with `Failed to load Starlark extension '@@rules_cc//cc:extensions.bzl'`.
   - Exclude `tf-keras` from `@release_or_nightly//:requirements.in` in `py_deps_profile.bzl` (while keeping the `@release_or_nightly//:tf_keras_pkg` target alias and adding `IS_NIGHTLY` to `environ`).
   - Persist `HERMETIC_PYTHON_VERSION` and `IS_NIGHTLY` via `build --repo_env` in `oss_scripts/configure.sh` and append the latest `tf-keras-nightly` pin and sha256 hash from PyPI directly to `requirements_lock_<py>.txt` after `requirements.update` so `pip_parse` still populates `@pypi_tf_keras_nightly`.
2. Add `common --features=-external_include_paths` and `common --host_features=-external_include_paths` in `oss_scripts/configure.sh` (matching TensorFlow `master`'s `.bazelrc`) so TFLite targets (`@@org_tensorflow//tensorflow/compiler/mlir/lite/schema:schema_utils`) build cleanly with the updated `rules_ml_toolchain` when `prepare_tf_dep.sh` pins `WORKSPACE` to a newer TensorFlow commit than `v2.22.0-rc0`.
3. Mark `tokenizers_benchmarks` and `ops_benchmarks` with `tags = ["manual"]` so `bazel test tensorflow_text:all` does not run them without `--benchmark_filter` and fail with `NO TESTS RAN` (exit code 5) under Python 3.12+.

PiperOrigin-RevId: 1000522266

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.

1 participant