omnipy.engine.local
| CLASS | DESCRIPTION |
|---|---|
LocalRunner |
Local job runner |
LocalRunner
Bases: JobRunnerEngine
flowchart BT
omnipy.engine.local.LocalRunner[LocalRunner]
omnipy.engine.job_runner.JobRunnerEngine[JobRunnerEngine]
omnipy.engine._base.Engine[Engine]
omnipy.engine.job_runner.JobRunnerEngine --> omnipy.engine.local.LocalRunner
omnipy.engine._base.Engine --> omnipy.engine.job_runner.JobRunnerEngine
click omnipy.engine.local.LocalRunner href "" "omnipy.engine.local.LocalRunner"
click omnipy.engine.job_runner.JobRunnerEngine href "" "omnipy.engine.job_runner.JobRunnerEngine"
click omnipy.engine._base.Engine href "" "omnipy.engine._base.Engine"
Local job runner
-
Reference
Code reference
omnipy
hub
runtimeRuntimeObjectslocal
| 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/local.py
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 |
supported_job_types
class-attribute
instance-attribute
supported_job_types = frozenset(
{JobType.TASK, JobType.LINEAR_FLOW, JobType.DAG_FLOW, JobType.FUNC_FLOW}
)
__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
classmethod
get_config_cls() -> Type[IsLocalRunnerConfig]
Return the config class associated with this engine type.
| PARAMETER | DESCRIPTION |
|---|---|
cls
|
Engine subclass whose configuration class is being requested.
|
| RETURNS | DESCRIPTION |
|---|---|
Type[IsLocalRunnerConfig]
|
Type[IsJobRunnerConfig]: Configuration class used to instantiate engine settings. |
Source code in src/omnipy/engine/local.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:
|