schrodinger.application.models.execution.context module¶
- class schrodinger.application.models.execution.context.ExecutionContext(composite_model: CompositeModel, row_source: AbstractRowSource, row_sink: AbstractRowSink)¶
Bases:
objectRuntime resources for a single model execution.
- composite_model: CompositeModel¶
- row_source: AbstractRowSource¶
- row_sink: AbstractRowSink¶
- __init__(composite_model: CompositeModel, row_source: AbstractRowSource, row_sink: AbstractRowSink) None¶
- schrodinger.application.models.execution.context.use_execution_context(context: ExecutionContext)¶
Make an execution context available for the duration of a model run.
Nested use is allowed only for the same model execution.
- Raises:
RuntimeError – if a different execution context is already active.
- schrodinger.application.models.execution.context.get_current_execution_context() ExecutionContext¶
Return the active model execution context.
- Raises:
RuntimeError – if there is no active model execution.