skillfed

tensorflow-transform

A library for data preprocessing with TensorFlow

tensorflow-transform v1.21.0 187.3K downloads/30d#9,968 on PyPI988
Permissive license Apache 2.0 Active released

What it is and what it does

TensorFlow Transform is a preprocessing library that extends TensorFlow's single-example capabilities to support full-pass operations over entire datasets. It handles transformations that require seeing all data—such as computing mean and standard deviation for normalization, building vocabularies from all unique values, or assigning data to quantile-based buckets—then exports the result as a frozen TensorFlow graph for reuse in both training and serving pipelines.

The library uses Apache Beam for distributed computation (defaulting to local mode but supporting Google Cloud Dataflow and other runners) and PyArrow for efficient vectorized operations. By applying identical transformations at train and serve time, it eliminates training-serving skew, a common source of model degradation in production.

Use it for:

  • Normalize numerical features by computing global mean and standard deviation across the entire training dataset.
  • Generate a vocabulary from all unique string values in a column and map strings to integer IDs consistently.
  • Assign continuous values to discrete buckets based on observed data quantiles or distribution.
  • Preprocess data pipelines for TensorFlow Extended (TFX) workflows with distributed Apache Beam runners.
  • Export preprocessing logic as a reusable TensorFlow graph to serve alongside trained models.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

TensorFlow Transform preprocesses data with full-pass operations like normalization, vocabulary generation, and bucketing, exporting a reusable TensorFlow graph for consistent training and serving.

Yes. TensorFlow Transform is production-stable, actively maintained, and essential for building ML pipelines that require full-pass preprocessing or consistent train-serve transformations. Install if you need stateful data transformations (normalization, vocabulary generation, bucketing) in TensorFlow workflows; skip if your preprocessing fits single-example operations.

Install

tensorflow-transform on PyPI

pip

pip install tensorflow-transform

uv

uv add tensorflow-transform

poetry

poetry add tensorflow-transform

Installing tensorflow-transform

Before you install

Low friction installation as a pure-Python wheel. Active maintenance with a recent release (64 days old) and ongoing repository activity. Requires TensorFlow and Apache Beam as core dependencies.

License in practice

Licensed under Apache 2.0 (permissive), allowing commercial use, modification, and distribution with minimal restrictions.

Quickstart

pip install tensorflow-transform

import tensorflow_transform as tft

# Use tft.scale_to_z_score() or tft.compute_and_apply_vocabulary()
# within a tf.Transform preprocessing function

Requires TensorFlow, Apache Beam, and PyArrow as runtime dependencies; Python 3.10 or later.

Verify before relying

  • Whether the package works with Google Cloud Dataflow or other Apache Beam runners without additional configuration.
  • Performance characteristics and scalability limits for very large datasets.
  • Compatibility with custom Apache Beam runners beyond the default local mode.

Package facts

License Apache 2.0 (permissive)
Python support supports the current Python release (<4,>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 10 — absl-py, apache-beam, numpy, protobuf, pyarrow, pydot, tensorflow, tensorflow-metadata, tf_keras, tfx-bsl
Maintenance actively maintained — 64 days since the last release
Last repo commit
First released
Downloads 187,343/month — #9,968 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: tensorflow_transform-1.21.0-py3-none-any.whl

Keywords: tensorflow, transform, tfx

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Scientific/EngineeringTopic :: Scientific/Engineering :: Artificial IntelligenceTopic :: Scientific/Engineering :: MathematicsTopic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python Modules

Tags

tensorflow data preprocessingfull-pass data transformationnormalize and bucket datavocabulary generation pipelinetraining serving skew preventionapache beam tensorflowdistributed data preprocessing
ml-preprocessingdistributed-computingtensorflow-ecosystem

More Software Development packages