Skip to content

Commit ff701e2

Browse files
committed
polish
1 parent bc90966 commit ff701e2

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

python/ray/dag/compiled_dag_node.py

+12-4
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@
4343

4444

4545
class DAGNodeOperationType(Enum):
46+
"""
47+
There are three types of operations that a DAG node can perform:
48+
1. READ: Read from an input channel.
49+
2. COMPUTE: Execute the method corresponding to the node.
50+
3. WRITE: Write to an output channel.
51+
"""
4652
READ = "READ"
4753
COMPUTE = "COMPUTE"
4854
WRITE = "WRITE"
@@ -54,13 +60,15 @@ def __init__(
5460
idx: int,
5561
operation_type: DAGNodeOperationType,
5662
):
57-
# not bind_index
63+
"""
64+
Args:
65+
idx: The index of the task that this operation belongs to
66+
in the actor's ExecutableTask list.
67+
operation_type: The type of operation to perform.
68+
"""
5869
self.idx = idx
5970
self.type = operation_type
6071

61-
def __repr__(self) -> str:
62-
return f"DAGNodeOperation({self.idx}, {self.type})"
63-
6472

6573
# Holds the input arguments for an accelerated DAG node.
6674
@PublicAPI(stability="alpha")

0 commit comments

Comments
 (0)