radical.asyncflow.backends.execution.noop¶
NoopExecutionBackend ¶
NoopExecutionBackend()
Bases: BaseExecutionBackend
A no-operation execution backend for testing and development purposes.
This backend simulates task execution without actually running any tasks. All submitted tasks immediately return dummy output and transition to DONE state. Useful for testing workflow logic without computational overhead.
Initialize the no-op execution backend.
Sets up dummy task storage, session, and default callback function. Registers backend states and confirms successful initialization.
Source code in doc_env/lib/python3.13/site-packages/radical/asyncflow/backends/execution/noop.py
16 17 18 19 20 21 22 23 24 25 26 |
|
state ¶
state()
Get the current state of the no-op execution backend.
Returns:
Name | Type | Description |
---|---|---|
str | Always returns 'IDLE' as this backend performs no actual work. |
Source code in doc_env/lib/python3.13/site-packages/radical/asyncflow/backends/execution/noop.py
28 29 30 31 32 33 34 |
|
task_state_cb ¶
task_state_cb(task: dict, state: str) -> None
Callback function invoked when a task's state changes.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
task | dict | Dictionary containing task information and metadata. | required |
state | str | The new state of the task. | required |
Note
This is a no-op implementation that performs no actions.
Source code in doc_env/lib/python3.13/site-packages/radical/asyncflow/backends/execution/noop.py
36 37 38 39 40 41 42 43 44 45 46 |
|
get_task_states_map ¶
get_task_states_map()
Retrieve a mapping of task IDs to their current states.
Returns:
Name | Type | Description |
---|---|---|
StateMapper | Object containing the mapping of task states for this backend. |
Source code in doc_env/lib/python3.13/site-packages/radical/asyncflow/backends/execution/noop.py
48 49 50 51 52 53 54 |
|
register_callback ¶
register_callback(func: Callable)
Register a callback for task state changes.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
func | Callable | Function to be called when task states change. Should accept task and state parameters. | required |
Source code in doc_env/lib/python3.13/site-packages/radical/asyncflow/backends/execution/noop.py
56 57 58 59 60 61 62 63 |
|
build_task ¶
build_task(uid, task_desc, task_specific_kwargs)
Build or prepare a task for execution.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
uid | Unique identifier for the task. | required | |
task_desc | Dictionary containing task description and metadata. | required | |
task_specific_kwargs | Backend-specific keyword arguments for the task. | required |
Note
This is a no-op implementation that performs no actual task building.
Source code in doc_env/lib/python3.13/site-packages/radical/asyncflow/backends/execution/noop.py
65 66 67 68 69 70 71 72 73 74 75 76 |
|
submit_tasks async
¶
submit_tasks(tasks)
Submit tasks for mock execution.
Immediately marks all tasks as completed with dummy output without performing any actual computation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
tasks | List of task dictionaries to be processed. Each task will receive dummy stdout and return_value before being marked as DONE. | required |
Source code in doc_env/lib/python3.13/site-packages/radical/asyncflow/backends/execution/noop.py
81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
|
link_explicit_data_deps ¶
link_explicit_data_deps(src_task=None, dst_task=None, file_name=None, file_path=None)
Handle explicit data dependencies between tasks.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
src_task | The source task that produces the dependency. Defaults to None. | None | |
dst_task | The destination task that depends on the source. Defaults to None. | None | |
file_name | Name of the file that represents the dependency. Defaults to None. | None | |
file_path | Full path to the file that represents the dependency. Defaults to None. | None |
Note
This is a no-op implementation as this backend doesn't handle dependencies.
Source code in doc_env/lib/python3.13/site-packages/radical/asyncflow/backends/execution/noop.py
96 97 98 99 100 101 102 103 104 105 106 107 108 |
|
link_implicit_data_deps ¶
link_implicit_data_deps(src_task, dst_task)
Handle implicit data dependencies for a task.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
src_task | The source task that produces data. | required | |
dst_task | The destination task that depends on the source task's output. | required |
Note
This is a no-op implementation as this backend doesn't handle dependencies.
Source code in doc_env/lib/python3.13/site-packages/radical/asyncflow/backends/execution/noop.py
110 111 112 113 114 115 116 117 118 119 120 |
|
shutdown async
¶
shutdown() -> None
Shutdown the no-op execution backend.
Performs cleanup operations. Since this is a no-op backend, no actual resources need to be cleaned up.
Source code in doc_env/lib/python3.13/site-packages/radical/asyncflow/backends/execution/noop.py
122 123 124 125 126 127 128 |
|