From 0baf807be09e48e60b3188ed6e1d1b99c9b3d594 Mon Sep 17 00:00:00 2001 From: Jack Ye Date: Thu, 20 Nov 2025 19:44:31 -0800 Subject: [PATCH] ci: use larger runner for doctest and fix failing tests (#2801) Currently test would fail after installing to around pytorch --- .github/workflows/python.yml | 2 +- python/python/lancedb/namespace.py | 18 +++++++++++------- python/python/lancedb/table.py | 4 ++-- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index dac5e3b4..60a18ac8 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -79,7 +79,7 @@ jobs: doctest: name: "Doctest" timeout-minutes: 30 - runs-on: "ubuntu-24.04" + runs-on: ubuntu-2404-8x-x64 defaults: run: shell: bash diff --git a/python/python/lancedb/namespace.py b/python/python/lancedb/namespace.py index 40a0648e..ea8e5fcc 100644 --- a/python/python/lancedb/namespace.py +++ b/python/python/lancedb/namespace.py @@ -127,13 +127,17 @@ class LanceNamespaceStorageOptionsProvider(StorageOptionsProvider): Examples -------- - >>> from lance_namespace import connect as namespace_connect - >>> namespace = namespace_connect("rest", {"url": "https://..."}) - >>> provider = LanceNamespaceStorageOptionsProvider( - ... namespace=namespace, - ... table_id=["my_namespace", "my_table"] - ... ) - >>> options = provider.fetch_storage_options() + Create a provider and fetch storage options:: + + from lance_namespace import connect as namespace_connect + + # Connect to namespace (requires a running namespace server) + namespace = namespace_connect("rest", {"uri": "https://..."}) + provider = LanceNamespaceStorageOptionsProvider( + namespace=namespace, + table_id=["my_namespace", "my_table"] + ) + options = provider.fetch_storage_options() """ def __init__(self, namespace: LanceNamespace, table_id: List[str]): diff --git a/python/python/lancedb/table.py b/python/python/lancedb/table.py index 333e3791..57af5e72 100644 --- a/python/python/lancedb/table.py +++ b/python/python/lancedb/table.py @@ -1018,7 +1018,7 @@ class Table(ABC): ... .when_not_matched_insert_all() \\ ... .execute(new_data) >>> res - MergeResult(version=2, num_updated_rows=2, num_inserted_rows=1, num_deleted_rows=0) + MergeResult(version=2, num_updated_rows=2, num_inserted_rows=1, num_deleted_rows=0, num_attempts=1) >>> # The order of new rows is non-deterministic since we use >>> # a hash-join as part of this operation and so we sort here >>> table.to_arrow().sort_by("a").to_pandas() @@ -3634,7 +3634,7 @@ class AsyncTable: ... .when_not_matched_insert_all() \\ ... .execute(new_data) >>> res - MergeResult(version=2, num_updated_rows=2, num_inserted_rows=1, num_deleted_rows=0) + MergeResult(version=2, num_updated_rows=2, num_inserted_rows=1, num_deleted_rows=0, num_attempts=1) >>> # The order of new rows is non-deterministic since we use >>> # a hash-join as part of this operation and so we sort here >>> table.to_arrow().sort_by("a").to_pandas()