From e62cf7b3e141b0169649c69e0a9b0d2396a87c47 Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Thu, 9 Jul 2026 00:30:50 +0800 Subject: [PATCH 1/2] Remove unsupported Lance dataset option --- src/lance_tensorflow/data.py | 5 ----- tests/test_data.py | 2 -- 2 files changed, 7 deletions(-) diff --git a/src/lance_tensorflow/data.py b/src/lance_tensorflow/data.py index 55bbcab..9a14c6c 100644 --- a/src/lance_tensorflow/data.py +++ b/src/lance_tensorflow/data.py @@ -156,7 +156,6 @@ def from_lance( output_signature: Optional[Dict[str, tf.TypeSpec]] = None, namespace_client: Optional["LanceNamespace"] = None, table_id: Optional[List[str]] = None, - ignore_namespace_table_storage_options: bool = False, ) -> tf.data.Dataset: """Create a ``tf.data.Dataset`` from a Lance dataset. @@ -184,9 +183,6 @@ def from_lance( table_id : Optional[List[str]], optional Table identifier used together with ``namespace_client`` to locate the table. - ignore_namespace_table_storage_options : bool, default False - When using ``namespace_client``/``table_id``, ignore storage options - returned by the namespace. Examples -------- @@ -237,7 +233,6 @@ def from_lance( dataset, namespace_client=namespace_client, table_id=table_id, - ignore_namespace_table_storage_options=ignore_namespace_table_storage_options, ) if isinstance(fragments, tf.data.Dataset): diff --git a/tests/test_data.py b/tests/test_data.py index 4b5b934..b6f523a 100644 --- a/tests/test_data.py +++ b/tests/test_data.py @@ -119,12 +119,10 @@ def fake_dataset(uri=None, **kwargs): None, namespace_client=ns, table_id=["tbl"], - ignore_namespace_table_storage_options=True, ) assert calls["kwargs"]["namespace_client"] is ns assert calls["kwargs"]["table_id"] == ["tbl"] - assert calls["kwargs"]["ignore_namespace_table_storage_options"] is True batches = list(ds) assert [b["a"].numpy().tolist() for b in batches] == [[1, 2]] From 7a6bbaa657ae3763ce671f8d48f08266e5a38d14 Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Thu, 9 Jul 2026 00:33:05 +0800 Subject: [PATCH 2/2] Align TensorFlow dataset test batch size --- tests/test_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_data.py b/tests/test_data.py index b6f523a..5c285bd 100644 --- a/tests/test_data.py +++ b/tests/test_data.py @@ -129,7 +129,7 @@ def fake_dataset(uri=None, **kwargs): def test_scan_use_tf_data(tf_dataset): - ds = tf.data.Dataset.from_lance(tf_dataset) + ds = tf.data.Dataset.from_lance(tf_dataset, batch_size=100) for idx, batch in enumerate(ds): assert batch["a"].numpy()[0] == idx * 100 assert batch["s"].numpy()[0] == f"val-{idx * 100}".encode("utf-8")