Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Input pipeline framework

License

NotificationsYou must be signed in to change notification settings

tensorflow/transform

Repository files navigation

PythonPyPIDocumentation

TensorFlow Transform is a library for preprocessing data with TensorFlow.tf.Transform is useful for data that requires a full-pass, such as:

  • Normalize an input value by mean and standard deviation.
  • Convert strings to integers by generating a vocabulary over all input values.
  • Convert floats to integers by assigning them to buckets based on the observeddata distribution.

TensorFlow has built-in support for manipulations on a single example or a batchof examples.tf.Transform extends these capabilities to support full-passesover the example data.

The output oftf.Transform is exported as aTensorFlow graph to use for training andserving. Using the same graph for both training and serving can prevent skewsince the same transformations are applied in both stages.

For an introduction totf.Transform, see thetf.Transform section of theTFX Dev Summit talk on TFX(link).

Installation

Thetensorflow-transformPyPI package is therecommended way to installtf.Transform:

pip install tensorflow-transform

Build TFT from source

To build from source follow the following steps:Create a virtual environment by running the commands

python -m venv<virtualenv_name>source<virtualenv_name>/bin/activategit clone https://github.com/tensorflow/transform.gitcd transformpip install.

If you are doing development on the TFT repo, replace

pip install.

with

pip install -e.

The-e flag causes TFT to be installed indevelopment mode.

Nightly Packages

TFT also hosts nightly packages athttps://pypi-nightly.tensorflow.org onGoogle Cloud. To install the latest nightly package, please use the followingcommand:

pip install --extra-index-url https://pypi-nightly.tensorflow.org/simple tensorflow-transform

This will install the nightly packages for the major dependencies of TFT suchas TensorFlow Metadata (TFMD), TFX Basic Shared Libraries (TFX-BSL).

Running Tests

To run TFT tests, run the following command from the root of the repository:

pytest

Notable Dependencies

TensorFlow is required.

Apache Beam is required; it's the way that efficientdistributed computation is supported. By default, Apache Beam runs in localmode but can also run in distributed mode usingGoogle Cloud Dataflow and other ApacheBeamrunners.

Apache Arrow is also required. TFT uses Arrow torepresent data internally in order to make use of vectorized numpy functions.

Compatible versions

The following table is thetf.Transform package versions that arecompatible with each other. This is determined by our testing framework, butotheruntested combinations may also work.

tensorflow-transformapache-beam[gcp]pyarrowtensorflowtensorflow-metadatatfx-bsl
GitHub master2.65.010.0.1nightly (2.x)1.17.11.17.1
1.17.02.65.010.0.12.171.17.11.17.1
1.16.02.60.010.0.12.161.16.11.16.1
1.15.02.47.010.0.02.151.15.01.15.1
1.14.02.47.010.0.02.131.14.01.14.0
1.13.02.41.06.0.02.121.13.11.13.0
1.12.02.41.06.0.02.111.12.01.12.0
1.11.02.41.06.0.01.15.5 / 2.101.11.01.11.0
1.10.02.40.06.0.01.15.5 / 2.91.10.01.10.0
1.9.02.38.05.0.01.15.5 / 2.91.9.01.9.0
1.8.02.38.05.0.01.15.5 / 2.81.8.01.8.0
1.7.02.36.05.0.01.15.5 / 2.81.7.01.7.0
1.6.12.35.05.0.01.15.5 / 2.81.6.01.6.0
1.6.02.35.05.0.01.15.5 / 2.71.6.01.6.0
1.5.02.34.05.0.01.15.2 / 2.71.5.01.5.0
1.4.12.33.04.0.11.15.2 / 2.61.4.01.4.0
1.4.02.33.04.0.11.15.2 / 2.61.4.01.4.0
1.3.02.31.02.0.01.15.2 / 2.61.2.01.3.0
1.2.02.31.02.0.01.15.2 / 2.51.2.01.2.0
1.1.12.29.02.0.01.15.2 / 2.51.1.01.1.1
1.1.02.29.02.0.01.15.2 / 2.51.1.01.1.0
1.0.02.29.02.0.01.15 / 2.51.0.01.0.0
0.30.02.28.02.0.01.15 / 2.40.30.00.30.0
0.29.02.28.02.0.01.15 / 2.40.29.00.29.0
0.28.02.28.02.0.01.15 / 2.40.28.00.28.1
0.27.02.27.02.0.01.15 / 2.40.27.00.27.0
0.26.02.25.00.17.01.15 / 2.30.26.00.26.0
0.25.02.25.00.17.01.15 / 2.30.25.00.25.0
0.24.12.24.00.17.01.15 / 2.30.24.00.24.1
0.24.02.23.00.17.01.15 / 2.30.24.00.24.0
0.23.02.23.00.17.01.15 / 2.30.23.00.23.0
0.22.02.20.00.16.01.15 / 2.20.22.00.22.0
0.21.22.17.00.15.01.15 / 2.10.21.00.21.3
0.21.02.17.00.15.01.15 / 2.10.21.00.21.0
0.15.02.16.00.14.01.15 / 2.00.15.00.15.0
0.14.02.14.00.14.01.140.14.0n/a
0.13.02.11.0n/a1.130.12.1n/a
0.12.02.10.0n/a1.120.12.0n/a
0.11.02.8.0n/a1.110.9.0n/a
0.9.02.6.0n/a1.90.9.0n/a
0.8.02.5.0n/a1.8n/an/a
0.6.02.4.0n/a1.6n/an/a
0.5.02.3.0n/a1.5n/an/a
0.4.02.2.0n/a1.4n/an/a
0.3.12.1.1n/a1.3n/an/a
0.3.02.1.1n/a1.3n/an/a
0.1.102.0.0n/a1.0n/an/a

Questions

Please direct any questions about working withtf.Transform toStack Overflow using thetensorflow-transformtag.

About

Input pipeline framework

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors30

Languages


[8]ページ先頭

©2009-2025 Movatter.jp