diff --git a/lance_ray/datasource.py b/lance_ray/datasource.py index 4c293b63..436aad89 100644 --- a/lance_ray/datasource.py +++ b/lance_ray/datasource.py @@ -201,7 +201,18 @@ def get_read_tasks(self, parallelism: int, **kwargs) -> list[ReadTask]: ) read_task = ReadTask( - lambda fids=fragment_ids, uri=dataset_uri, version=dataset_version, storage_options=dataset_storage_options, manifest=serialized_manifest, ns_impl=namespace_impl, ns_props=namespace_properties, tbl_id=table_id, base_params=base_store_params, scanner_options=self._scanner_options, retry_params=self._retry_params, with_metadata=self._with_metadata: ( + lambda fids=fragment_ids, + uri=dataset_uri, + version=dataset_version, + storage_options=dataset_storage_options, + manifest=serialized_manifest, + ns_impl=namespace_impl, + ns_props=namespace_properties, + tbl_id=table_id, + base_params=base_store_params, + scanner_options=self._scanner_options, + retry_params=self._retry_params, + with_metadata=self._with_metadata: ( _read_fragments_with_retry( fids, uri, diff --git a/lance_ray/index.py b/lance_ray/index.py index 7999103c..961fe3f6 100755 --- a/lance_ray/index.py +++ b/lance_ray/index.py @@ -105,9 +105,7 @@ def _distribute_fragments_balanced( # Greedy assignment: assign each fragment to the segment with minimum workload for frag_info in fragment_info: - min_workload_idx = min( - range(num_segments), key=lambda i: segment_workloads[i] - ) + min_workload_idx = min(range(num_segments), key=lambda i: segment_workloads[i]) segment_batches[min_workload_idx].append(frag_info["id"]) segment_workloads[min_workload_idx] += frag_info["size"] diff --git a/lance_ray/utils.py b/lance_ray/utils.py index 12fe3659..5e3c8b75 100644 --- a/lance_ray/utils.py +++ b/lance_ray/utils.py @@ -238,9 +238,7 @@ def resolve_namespace_table( ) location = describe_response.location if location is None: - raise ValueError( - "Namespace did not return a 'location' for the table" - ) + raise ValueError("Namespace did not return a 'location' for the table") if describe_response.storage_options: merged_storage_options.update(describe_response.storage_options) return location, merged_storage_options diff --git a/pyproject.toml b/pyproject.toml index b7d14df8..742b380c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ classifiers = [ dependencies = [ "ray[data]>=2.41.0", - "pylance==9.0.0rc1", + "pylance>=9.1.0b8", "lance-namespace", "packaging", "pyarrow>=17.0.0", diff --git a/uv.lock b/uv.lock index 42589210..352e6991 100644 --- a/uv.lock +++ b/uv.lock @@ -221,7 +221,7 @@ name = "exceptiongroup" version = "1.3.0" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "typing-extensions", marker = "python_full_version < '3.11'" }, + { name = "typing-extensions" }, ] sdist = { url = "https://files.pythonhosted.org/packages/0b/9f/a65090624ecf468cdca03533906e7c69ed7588582240cfe7cc9e770b50eb/exceptiongroup-1.3.0.tar.gz", hash = "sha256:b241f5885f560bc56a59ee63ca4c6a8bfa46ae4ad651af316d4e81817bb9fd88", size = 29749, upload-time = "2025-05-10T17:42:51.123Z" } wheels = [ @@ -387,7 +387,7 @@ requires-dist = [ { name = "more-itertools", marker = "python_full_version < '3.12'", specifier = ">=2.6.0" }, { name = "packaging" }, { name = "pyarrow", specifier = ">=17.0.0" }, - { name = "pylance", specifier = "==9.0.0rc1" }, + { name = "pylance", specifier = ">=9.1.0b8" }, { name = "pytest", marker = "extra == 'dev'", specifier = ">=8.4.0" }, { name = "pytest-asyncio", marker = "extra == 'dev'", specifier = ">=1.0.0" }, { name = "pytest-cov", marker = "extra == 'dev'", specifier = ">=5.0.0" }, @@ -1024,7 +1024,7 @@ wheels = [ [[package]] name = "pylance" -version = "9.0.0rc1" +version = "9.1.0b8" source = { registry = "https://pypi.fury.io/lance-format" } dependencies = [ { name = "lance-namespace" }, @@ -1033,12 +1033,12 @@ dependencies = [ { name = "pyarrow" }, ] wheels = [ - { url = "https://pypi.fury.io/lance-format/-/ver_vEHBE/pylance-9.0.0rc1-cp310-abi3-macosx_11_0_arm64.whl", hash = "sha256:f0b6b02a1808bb3072ee7fe4e36614cae6f86302513e73ec7f55b2234a963b24" }, - { url = "https://pypi.fury.io/lance-format/-/ver_1Jipm4/pylance-9.0.0rc1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:30f0ebf0d88034301819eb964f9236ce555aaa58e7ab89c5975a3e2250bbb405" }, - { url = "https://pypi.fury.io/lance-format/-/ver_IvKxo/pylance-9.0.0rc1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:44609ea2615ea6e684b85478d1694af2026458f61cf7895ecc75e238bfd17aa8" }, - { url = "https://pypi.fury.io/lance-format/-/ver_2hidj1/pylance-9.0.0rc1-cp310-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:182167a8dba9eeabffbffd53bd5b8548613d4d459b7cd7b34a840dd00cbb806f" }, - { url = "https://pypi.fury.io/lance-format/-/ver_1dFx3r/pylance-9.0.0rc1-cp310-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:8a63b11e814b7eab758bcaf0d6f97eb05ea86203d9fb0af718c462c24c7d6c9c" }, - { url = "https://pypi.fury.io/lance-format/-/ver_2a8dSh/pylance-9.0.0rc1-cp310-abi3-win_amd64.whl", hash = "sha256:2ff8b953ae2b0550490c1a7efd210aa91bc223d200ffac28849056cfd7436d97" }, + { url = "https://pypi.fury.io/lance-format/-/ver_AGX5P/pylance-9.1.0b8-cp310-abi3-macosx_11_0_arm64.whl", hash = "sha256:d10be5ad0cabb0761978df9cf830362326595257ccfd41074ba0da513b02681c" }, + { url = "https://pypi.fury.io/lance-format/-/ver_1KK5SU/pylance-9.1.0b8-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:642d4fbca85bf0630341af82884c62935ffec33de00990d3f0695797568b224e" }, + { url = "https://pypi.fury.io/lance-format/-/ver_1xoB00/pylance-9.1.0b8-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fb3403281e794782423e32579c0b2992b1e050d29fc3d2218338c3d6554059a5" }, + { url = "https://pypi.fury.io/lance-format/-/ver_2iJSLN/pylance-9.1.0b8-cp310-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:d0058676ddf22807a7eb47c270f08372def0159315d8457eb59ab020c0c98f05" }, + { url = "https://pypi.fury.io/lance-format/-/ver_27GicD/pylance-9.1.0b8-cp310-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:cefc12581d9d030308ce5e7e8b5f20ab2784553aac72af6fac099b01f3823d52" }, + { url = "https://pypi.fury.io/lance-format/-/ver_uPzKS/pylance-9.1.0b8-cp310-abi3-win_amd64.whl", hash = "sha256:7799f4717c1ccdb957b66d0875381aea3b1dd4f5aa0102aa513e6ee1ebe20409" }, ] [[package]]