omnipy.shared.protocols.compute.job_creator
Protocols for job creator and job config holder contracts.
| CLASS | DESCRIPTION |
|---|---|
IsJobConfigHolder |
Protocol for objects that hold mutable job config and engine state. |
IsJobCreator |
Protocol for nested-context job creators. |
IsJobConfigHolder
Bases: Protocol
flowchart BT
omnipy.shared.protocols.compute.job_creator.IsJobConfigHolder[IsJobConfigHolder]
click omnipy.shared.protocols.compute.job_creator.IsJobConfigHolder href "" "omnipy.shared.protocols.compute.job_creator.IsJobConfigHolder"
Protocol for objects that hold mutable job config and engine state.
- Reference Code reference omnipy
-
Reference
Code reference
omnipy
shared
protocols
compute
job_creatorIsJobCreator
| METHOD | DESCRIPTION |
|---|---|
set_config |
Replace the shared job configuration used by the holder. |
set_engine |
Set the engine used by the holder for future applied jobs. |
| ATTRIBUTE | DESCRIPTION |
|---|---|
config |
Return the shared job configuration associated with the holder.
TYPE:
|
engine |
Return the engine currently associated with the holder, if any.
TYPE:
|
Source code in src/omnipy/shared/protocols/compute/job_creator.py
config
property
config: IsJobConfig
Return the shared job configuration associated with the holder.
| RETURNS | DESCRIPTION |
|---|---|
IsJobConfig
|
Shared job configuration used for future jobs and runtime lookups.
TYPE:
|
engine
property
engine: IsEngine | None
Return the engine currently associated with the holder, if any.
| RETURNS | DESCRIPTION |
|---|---|
IsEngine | None
|
IsEngine | None: Engine used for decorating applied jobs, or |
set_config
set_config(config: IsJobConfig) -> None
Replace the shared job configuration used by the holder.
| PARAMETER | DESCRIPTION |
|---|---|
config
|
Job configuration object to store for future jobs.
TYPE:
|
Source code in src/omnipy/shared/protocols/compute/job_creator.py
set_engine
set_engine(engine: IsEngine) -> None
Set the engine used by the holder for future applied jobs.
| PARAMETER | DESCRIPTION |
|---|---|
engine
|
Engine that should decorate jobs created through this holder.
TYPE:
|
Source code in src/omnipy/shared/protocols/compute/job_creator.py
IsJobCreator
Bases: IsNestedContext, IsJobConfigHolder, Protocol
flowchart BT
omnipy.shared.protocols.compute.job_creator.IsJobCreator[IsJobCreator]
omnipy.shared.protocols.compute.mixins.IsNestedContext[IsNestedContext]
omnipy.shared.protocols.compute.job_creator.IsJobConfigHolder[IsJobConfigHolder]
omnipy.shared.protocols.compute.mixins.IsNestedContext --> omnipy.shared.protocols.compute.job_creator.IsJobCreator
omnipy.shared.protocols.compute.job_creator.IsJobConfigHolder --> omnipy.shared.protocols.compute.job_creator.IsJobCreator
click omnipy.shared.protocols.compute.job_creator.IsJobCreator href "" "omnipy.shared.protocols.compute.job_creator.IsJobCreator"
click omnipy.shared.protocols.compute.mixins.IsNestedContext href "" "omnipy.shared.protocols.compute.mixins.IsNestedContext"
click omnipy.shared.protocols.compute.job_creator.IsJobConfigHolder href "" "omnipy.shared.protocols.compute.job_creator.IsJobConfigHolder"
Protocol for nested-context job creators.
-
Reference
Code reference
omnipy
shared
protocols
compute
jobHasJobCreatorjob_creator
| METHOD | DESCRIPTION |
|---|---|
set_config |
Replace the shared job configuration used by the holder. |
set_engine |
Set the engine used by the holder for future applied jobs. |
| ATTRIBUTE | DESCRIPTION |
|---|---|
config |
Return the shared job configuration associated with the holder.
TYPE:
|
engine |
Return the engine currently associated with the holder, if any.
TYPE:
|
nested_context_level |
Return the current depth of nested job-execution contexts.
TYPE:
|
time_of_cur_toplevel_nested_context_run |
Return the start time for the active top-level execution context, if any.
TYPE:
|
Source code in src/omnipy/shared/protocols/compute/job_creator.py
config
property
config: IsJobConfig
Return the shared job configuration associated with the holder.
| RETURNS | DESCRIPTION |
|---|---|
IsJobConfig
|
Shared job configuration used for future jobs and runtime lookups.
TYPE:
|
engine
property
engine: IsEngine | None
Return the engine currently associated with the holder, if any.
| RETURNS | DESCRIPTION |
|---|---|
IsEngine | None
|
IsEngine | None: Engine used for decorating applied jobs, or |
nested_context_level
property
Return the current depth of nested job-execution contexts.
| RETURNS | DESCRIPTION |
|---|---|
int
|
Number of currently active nested execution contexts.
TYPE:
|
time_of_cur_toplevel_nested_context_run
property
Return the start time for the active top-level execution context, if any.
| RETURNS | DESCRIPTION |
|---|---|
datetime | None
|
datetime | None: Timestamp recorded when the outermost execution context started, or
|
set_config
set_config(config: IsJobConfig) -> None
Replace the shared job configuration used by the holder.
| PARAMETER | DESCRIPTION |
|---|---|
config
|
Job configuration object to store for future jobs.
TYPE:
|
Source code in src/omnipy/shared/protocols/compute/job_creator.py
set_engine
set_engine(engine: IsEngine) -> None
Set the engine used by the holder for future applied jobs.
| PARAMETER | DESCRIPTION |
|---|---|
engine
|
Engine that should decorate jobs created through this holder.
TYPE:
|