Prepare the set of tasks that will make up the next Pregel step.
prepare_next_tasks(
checkpoint: Checkpoint,
pending_writes: list[PendingWrite],
processes: Mapping[str, PregelNode],
channels: Mapping[str, BaseChannel],
managed: ManagedValueMapping,
config: RunnableConfig,
step: int,
stop: int,
*,
for_execution: bool,
store: BaseStore | None = None,
checkpointer: BaseCheckpointSaver | None = None,
manager: None | ParentRunManager | AsyncParentRunManager = None,
trigger_to_nodes: Mapping[str, Sequence[str]] | None = None,
updated_channels: set[str] | None = None,
retry_policy: Sequence[RetryPolicy] = (),
cache_policy: CachePolicy | None = None
) -> dict[str, PregelTask] | dict[str, PregelExecutableTask]| Name | Type | Description |
|---|---|---|
checkpoint* | Checkpoint | The current checkpoint. |
pending_writes* | list[PendingWrite] | The list of pending writes. |
processes* | Mapping[str, PregelNode] | The mapping of process names to PregelNode instances. |
channels* | Mapping[str, BaseChannel] | The mapping of channel names to BaseChannel instances. |
managed* | ManagedValueMapping | The mapping of managed value names to functions. |
config* | RunnableConfig | The |
step* | int | The current step. |
for_execution* | bool | Whether the tasks are being prepared for execution. |
store | BaseStore | None | Default: NoneAn instance of BaseStore to make it available for usage within tasks. |
checkpointer | BaseCheckpointSaver | None | Default: None
|
manager | None | ParentRunManager | AsyncParentRunManager | Default: NoneThe parent run manager to use for the tasks. |
trigger_to_nodes | Mapping[str, Sequence[str]] | None | Default: NoneOptional: Mapping of channel names to the set of nodes that are can be triggered by that channel. |
updated_channels | set[str] | None | Default: NoneOptional. Set of channel names that have been updated during the previous step. Using in conjunction with trigger_to_nodes to speed up the process of determining which nodes should be triggered in the next step. |