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/compaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ def compact_files(
# Step 1: Create the compaction plan
# Compaction.plan requires a dict; CompactionOptions is a TypedDict, so
# an empty instance stands in for "all defaults" when the caller omits it.
compaction_plan = Compaction.plan(dataset, compaction_options or CompactionOptions())
compaction_plan = Compaction.plan(
dataset, compaction_options or CompactionOptions()
)

logger.info(f"Compaction plan created with {compaction_plan.num_tasks()} tasks")

Expand Down
13 changes: 12 additions & 1 deletion lance_ray/datasource.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 1 addition & 3 deletions lance_ray/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down
4 changes: 1 addition & 3 deletions lance_ray/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
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==9.0.0rc1",
"pylance>=10.0.0b4",
"lance-namespace",
"packaging",
"pyarrow>=17.0.0",
Expand Down
17 changes: 8 additions & 9 deletions uv.lock

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

Loading