Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lance_ray/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ def set_global_pool(pool: Any | None) -> None:
global _GLOBAL_POOL, _GLOBAL_POOL_PROCESSES
with _GLOBAL_POOL_LOCK:
_GLOBAL_POOL = pool
_GLOBAL_POOL_PROCESSES = _read_pool_processes(pool) if pool is not None else None
_GLOBAL_POOL_PROCESSES = (
_read_pool_processes(pool) if pool is not None else None
)


def get_global_pool() -> Any | None:
Expand Down
12 changes: 9 additions & 3 deletions lance_ray/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,9 @@ def _candidate_k(nearest: dict[str, Any], oversample_factor: float) -> tuple[int
try:
global_k = int(nearest["k"])
except KeyError as exc:
raise ValueError("nearest must include 'k' for distributed vector search") from exc
raise ValueError(
"nearest must include 'k' for distributed vector search"
) from exc

if global_k <= 0:
raise ValueError(f"nearest['k'] must be positive, got {global_k}")
Expand Down Expand Up @@ -618,7 +620,9 @@ def vector_search(
worker_table_id = table_id
dataset = LanceDataset(
dataset_uri,
**_dataset_load_kwargs(merged_storage_options, namespace_kwargs, block_size),
**_dataset_load_kwargs(
merged_storage_options, namespace_kwargs, block_size
),
)
else:
dataset = uri
Expand Down Expand Up @@ -686,7 +690,9 @@ def run_plan(plan: _SearchPlan) -> pa.Table:
) as pool:
results = pool.map_async(run_plan, plans, chunksize=1).get()
except Exception as exc: # pragma: no cover - exercised via integration tests
raise RuntimeError(f"Failed to complete distributed vector search: {exc}") from exc
raise RuntimeError(
f"Failed to complete distributed vector search: {exc}"
) from exc

if analyze_plan:
return _format_analyze_plan_results(results)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ classifiers = [

dependencies = [
"ray[data]>=2.41.0",
"pylance>=7.0.0b7",
"pylance>=8.0.0b2",
"lance-namespace",
"packaging",
"pyarrow>=17.0.0",
Expand Down
26 changes: 12 additions & 14 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading