Skip to main content

TensorFlow integration for Lance datasets

Project description

lance-tensorflow

TensorFlow integration for Lance datasets.

This package provides a small Python adapter that exposes Lance datasets as tf.data.Dataset pipelines. The core Lance format and Python bindings remain in the pylance package.

Install

pip install lance-tensorflow

TensorFlow support is currently targeted at Linux.

Usage

from lance_tensorflow import from_lance

ds = from_lance(
    "s3://bucket/path",
    columns=["image", "label"],
    filter="split = 'train'",
    batch_size=256,
)

for batch in ds:
    print(batch["label"])

If you want the tf.data.Dataset.from_lance convenience methods, register them explicitly:

import tensorflow as tf
import lance_tensorflow

lance_tensorflow.register_tensorflow_dataset()

ds = tf.data.Dataset.from_lance("s3://bucket/path")

Development

uv sync
uv run pytest
uv run ruff format .
uv run ruff check .

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lance_tensorflow-0.1.0.tar.gz (100.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lance_tensorflow-0.1.0-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file lance_tensorflow-0.1.0.tar.gz.

File metadata

  • Download URL: lance_tensorflow-0.1.0.tar.gz
  • Upload date:
  • Size: 100.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for lance_tensorflow-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3aedf233e17f84cc6c29381c076e124a267202ade06819bd3e1466271b3002cb
MD5 0e7371d3d255f09ea520318192f1db54
BLAKE2b-256 ba8ff060ac3496728c213668200c16bfb528dd11b566ac67256aee11d5f0fa57

See more details on using hashes here.

Provenance

The following attestation bundles were made for lance_tensorflow-0.1.0.tar.gz:

Publisher: publish.yml on lance-format/lance-tensorflow

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lance_tensorflow-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for lance_tensorflow-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 06b09dd831f525ed046e3ad389da627e462f0f66c0c8123f0ec53f210ac8a7ee
MD5 0101937b3272b9c1509cbb80ec41b13f
BLAKE2b-256 309318b84a3b1a9ea1d33f242f7f21df1f8c7386dddb1dc1f94f4594eac8ff53

See more details on using hashes here.

Provenance

The following attestation bundles were made for lance_tensorflow-0.1.0-py3-none-any.whl:

Publisher: publish.yml on lance-format/lance-tensorflow

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page