TensorFlow IO Nightly

raw JSON →
0.31.0.dev20230309180344 verified Sat May 09 auth: no python

Nightly build of TensorFlow I/O, a library of datasets and file system extensions for TensorFlow. Provides support for reading/writing various file formats (e.g., Apache Avro, Parquet, TFRecord) and distributed file systems (e.g., S3, GCS, HDFS). Latest stable up to 0.37.1. Release cadence weekly to monthly.

pip install tensorflow-io-nightly
error ModuleNotFoundError: No module named 'tensorflow_io'
cause Package not installed, or installed under different name (tensorflow-io vs tensorflow-io-nightly).
fix
Run 'pip install tensorflow-io-nightly' (or 'tensorflow-io' for stable).
error ImportError: cannot import name 'IOTensor' from 'tensorflow_io'
cause Incorrect import path; IOTensor may be under tensorflow_io.experimental or may not exist in the installed version.
fix
Use 'from tensorflow_io.experimental import IOTensor' for experimental versions.
error AttributeError: module 'tensorflow_io' has no attribute 'io'
cause Wrong import pattern; users try to import tensorflow_io.io as a submodule.
fix
Use 'import tensorflow_io as tfio' or 'from tensorflow_io import ...' directly.
gotcha tensorflow-io-nightly and tensorflow-io are different packages. Do NOT install both; they conflict. Use one or the other.
fix Uninstall both with 'pip uninstall tensorflow-io tensorflow-io-nightly', then install only the desired one.
breaking tensorflow-io-nightly is a nightly build and may be unstable or have breaking changes. It is not intended for production use.
fix Use the stable 'tensorflow-io' package for production.
deprecated Some APIs in tensorflow_io (e.g., certain dataset constructors) rely on TensorFlow 2.x patterns and may not work with TensorFlow 1.x.
fix Upgrade to TensorFlow 2.x and use the recommended IODataset API.

Basic usage: import and read a TFRecord file using the experimental IODataset.

import tensorflow as tf
import tensorflow_io as tfio

# Read a CSV file using the experimental CSV dataset
dataset = tfio.experimental.IODataset.from_tfrecord('/path/to/file.tfrecord')
for record in dataset.take(1):
    print(record)