omnipy.engine.job_runner
| CLASS | DESCRIPTION |
|---|---|
JobRunDef |
Describe the run-spec class and hook names used for one job type. |
JobRunnerEngine |
Base class for job runner engine implementations |
| ATTRIBUTE | DESCRIPTION |
|---|---|
ExecRunHookName |
|
FLOW_RUN_HOOKS |
TYPE:
|
InitRunHookName |
|
JOB_TYPE_TO_RUN_DEF |
|
JobRunHookNames |
|
TASK_RUN_HOOKS |
TYPE:
|
ExecRunHookName
module-attribute
-
Reference
Code reference
omnipy
engine
job_runnerJobRunDefrun_hook_name
-
Reference
Code reference
omnipy
engine
job_runnerJobRunHookNames
FLOW_RUN_HOOKS
module-attribute
FLOW_RUN_HOOKS: JobRunHookNames = ('_init_flow', '_run_flow')
-
Reference
Code reference
omnipy
engine
job_runnerJOB_TYPE_TO_RUN_DEF
InitRunHookName
module-attribute
-
Reference
Code reference
omnipy
engine
job_runnerJobRunDefinit_hook_name
-
Reference
Code reference
omnipy
engine
job_runnerJobRunHookNames
JOB_TYPE_TO_RUN_DEF
module-attribute
JOB_TYPE_TO_RUN_DEF: dict[JobType.Literals, JobRunDef] = {
JobType.TASK: JobRunDef(TaskRunSpec, TASK_RUN_HOOKS[0], TASK_RUN_HOOKS[1]),
JobType.LINEAR_FLOW: JobRunDef(LinearFlowRunSpec, FLOW_RUN_HOOKS[0], FLOW_RUN_HOOKS[1]),
JobType.DAG_FLOW: JobRunDef(DagFlowRunSpec, FLOW_RUN_HOOKS[0], FLOW_RUN_HOOKS[1]),
JobType.FUNC_FLOW: JobRunDef(FuncFlowRunSpec, FLOW_RUN_HOOKS[0], FLOW_RUN_HOOKS[1]),
}
JobRunHookNames
module-attribute
JobRunHookNames = tuple[InitRunHookName, ExecRunHookName]
-
Reference
Code reference
omnipy
engine
job_runner
TASK_RUN_HOOKS
module-attribute
TASK_RUN_HOOKS: JobRunHookNames = ('_init_task', '_run_task')
-
Reference
Code reference
omnipy
engine
job_runnerJOB_TYPE_TO_RUN_DEF
JobRunDef
Bases: NamedTuple
flowchart BT
omnipy.engine.job_runner.JobRunDef[JobRunDef]
click omnipy.engine.job_runner.JobRunDef href "" "omnipy.engine.job_runner.JobRunDef"
Describe the run-spec class and hook names used for one job type.
-
Reference
Code reference
omnipy
engine
job_runnerJOB_TYPE_TO_RUN_DEF
-
Reference
Code reference
omnipy
engine
job_runnerJOB_TYPE_TO_RUN_DEF
| ATTRIBUTE | DESCRIPTION |
|---|---|
init_hook_name |
TYPE:
|
run_hook_name |
TYPE:
|
run_spec |
TYPE:
|
Source code in src/omnipy/engine/job_runner.py
JobRunnerEngine
Bases: Engine, ABC
flowchart BT
omnipy.engine.job_runner.JobRunnerEngine[JobRunnerEngine]
omnipy.engine._base.Engine[Engine]
omnipy.engine._base.Engine --> omnipy.engine.job_runner.JobRunnerEngine
click omnipy.engine.job_runner.JobRunnerEngine href "" "omnipy.engine.job_runner.JobRunnerEngine"
click omnipy.engine._base.Engine href "" "omnipy.engine._base.Engine"
Base class for job runner engine implementations
- Reference Code reference omnipy
| METHOD | DESCRIPTION |
|---|---|
__init__ |
Initialize engine config, registry holder, and subclass state. |
apply_job_decorator |
Attach the engine's execution decorator to a job callback endpoint. |
get_config_cls |
Return the config class associated with this engine type. |
set_config |
Replace the active config and refresh config-dependent state. |
set_registry |
Attach or clear the run-state registry used for job state reporting. |
supports |
Return whether the engine can initialize and run |
| ATTRIBUTE | DESCRIPTION |
|---|---|
config |
Return the currently active engine configuration.
TYPE:
|
registry |
Return the registry currently used for run-state reporting.
TYPE:
|
supported_job_types |
|
Source code in src/omnipy/engine/job_runner.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 | |
config
property
config: IsJobRunnerConfig
Return the currently active engine configuration.
| RETURNS | DESCRIPTION |
|---|---|
IsJobRunnerConfig
|
Active configuration object controlling engine behavior.
TYPE:
|
registry
property
registry: IsRunStateRegistry | None
Return the registry currently used for run-state reporting.
| RETURNS | DESCRIPTION |
|---|---|
IsRunStateRegistry | None
|
IsRunStateRegistry | None: Registry receiving job-state updates, or |
__init__
Initialize engine config, registry holder, and subclass state.
Source code in src/omnipy/engine/_base.py
apply_job_decorator
apply_job_decorator(
job_type: JobType.Literals, job: IsFuncArgJob, job_callback_accept_decorator: Callable
) -> None
Attach the engine's execution decorator to a job callback endpoint.
| PARAMETER | DESCRIPTION |
|---|---|
job_type
|
Job category selecting the run behavior. |
job
|
Job instance being prepared for execution.
TYPE:
|
job_callback_accept_decorator
|
Consumer that accepts the engine-provided decorator.
TYPE:
|
Source code in src/omnipy/engine/job_runner.py
get_config_cls
abstractmethod
classmethod
get_config_cls() -> Type[IsJobRunnerConfig]
Return the config class associated with this engine type.
| PARAMETER | DESCRIPTION |
|---|---|
cls
|
Engine subclass whose configuration class is being requested.
|
| RETURNS | DESCRIPTION |
|---|---|
Type[IsJobRunnerConfig]
|
Type[IsJobRunnerConfig]: Configuration class used to instantiate engine settings. |
Source code in src/omnipy/engine/_base.py
set_config
set_config(config: IsJobRunnerConfig) -> None
Replace the active config and refresh config-dependent state.
| PARAMETER | DESCRIPTION |
|---|---|
config
|
Runtime configuration object for the engine.
TYPE:
|
Source code in src/omnipy/engine/_base.py
set_registry
set_registry(registry: IsRunStateRegistry | None) -> None
Attach or clear the run-state registry used for job state reporting.
| PARAMETER | DESCRIPTION |
|---|---|
registry
|
Registry implementation, or
TYPE:
|
Source code in src/omnipy/engine/_base.py
supports
Return whether the engine can initialize and run job_type jobs.
| PARAMETER | DESCRIPTION |
|---|---|
job_type
|
Job category to test. |
| RETURNS | DESCRIPTION |
|---|---|
bool
|
TYPE:
|