tfx-bsl (TFX Basic Shared Libraries) is a foundational Python library within the TensorFlow Extended (TFX) ecosystem. It provides low-level, high-performance data manipulation primitives, including efficient handling of TF.Example and Apache Arrow data structures, and optimized C++ extensions. It serves as a core dependency for many TFX libraries and components like TensorFlow Data Validation (TFDV) and TensorFlow Transform (TFT). The current version is 1.17.1, and it follows the TFX release cadence, typically aligning with TensorFlow releases.
pip install tfx-bslVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to convert `tf.train.Example` protobufs to an Apache Arrow `RecordBatch` and back using `tfx_bsl`'s `ExampleToRecordBatchDecoder` and `RecordBatchToExamplesEncoder`. This is a core data transformation task that `tfx-bsl` facilitates for TFX components.
Always install `tfx` (which pins `tfx-bsl`) or refer to the official TFX compatibility matrix: `https://www.tensorflow.org/tfx/releases#python_package_compatibility`.
Ensure your environment uses Python 3.9, 3.10, or 3.11. Check `requires_python` from PyPI for the exact range for your specific `tfx-bsl` version.
Prefer `pip install tfx` (which includes `tfx-bsl` and `tensorflow`) or `pip install tfx-bsl[tensorflow]` to ensure core dependencies are aligned.
Use pre-built wheels if possible. If building from source, ensure your C++ toolchain (gcc/g++) is compatible with TensorFlow's requirements and that all necessary libraries are present. Often, this means sticking to official Docker images or tested environments.