Skip to content

Commit

Permalink
Merge remote-tracking branch 'rjzamora/cudf-polars-dask-simple' into …
Browse files Browse the repository at this point in the history
…cudf-polars-dask-simple
  • Loading branch information
pentschev committed Nov 14, 2024
2 parents 2b74f28 + 453e274 commit 6d3cd55
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions python/cudf_polars/cudf_polars/experimental/parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def _clear_parts_info_cache() -> None:
def get_key_name(node: Node | NamedExpr) -> str:
"""Generate the key name for a Node."""
if isinstance(node, NamedExpr):
return f"named-{get_key_name(node.value)}"
return f"named-{get_key_name(node.value)}" # pragma: no cover
return f"{type(node).__name__.lower()}-{hash(node)}"


Expand All @@ -71,7 +71,7 @@ def _default_ir_parts_info(ir: IR) -> PartitionInfo:
if count > 1:
raise NotImplementedError(
f"Class {type(ir)} does not support multiple partitions."
)
) # pragma: no cover
return PartitionInfo(count=count)


Expand All @@ -95,15 +95,17 @@ def _default_ir_tasks(ir: IR) -> MutableMapping[Any, Any]:
# Single-partition default behavior.
# This is used by `generate_ir_tasks` for all unregistered IR sub-types.
if ir_parts_info(ir).count > 1:
raise NotImplementedError(f"Failed to generate tasks for {ir}.")
raise NotImplementedError(
f"Failed to generate multiple output tasks for {ir}."
) # pragma: no cover

child_names = []
for child in ir.children:
child_names.append(get_key_name(child))
if ir_parts_info(child).count > 1:
raise NotImplementedError(
f"Failed to generate tasks for {ir} with child {child}."
)
) # pragma: no cover

key_name = get_key_name(ir)
return {
Expand Down

0 comments on commit 6d3cd55

Please sign in to comment.