ExaRuntime#
Module: exa.core.provider.provider
- class ExaRuntime(*, executor, storage, experiment_configuration=None)#
Bases:
SerializableProcess-wide singleton providing quantum execution and storage interfaces.
Methods
Forcefully clear the entire runtime stack, including active scopes.
Reconstruct an instance from a dictionary payload.
Standardized interface for job execution from the active runtime.
Access the experiment configuration instance for this runtime.
Return the current active runtime instance.
Get the database ID of the package version information of the current Python runtime.
Return True if a runtime is available.
Context manager to temporarily override the runtime.
Serialize the object instance into a dictionary payload.
Set the root-level runtime (index 0).
Standardized interface for data persistence from the active runtime.
- Parameters:
executor (ExecutorInterface)
storage (StorageInterface)
experiment_configuration (ExperimentConfiguration | None)
- classmethod deserialize(data)#
Reconstruct an instance from a dictionary payload.
- Parameters:
- Return type:
- static get()#
Return the current active runtime instance.
- Return type:
- static executor()#
Standardized interface for job execution from the active runtime.
- Return type:
- static storage()#
Standardized interface for data persistence from the active runtime.
- Return type:
- static experiment_configuration()#
Access the experiment configuration instance for this runtime.
- Return type:
- static get_or_create_software_version_set()#
Get the database ID of the package version information of the current Python runtime.
- Return type:
- static set(ctx)#
Set the root-level runtime (index 0).
If a root-level runtime is already set, its executor and storage are closed (see
ExecutorInterface.close()andStorageInterface.close()) before being replaced, so they can release any resources they own (e.g. in-process background threads, pooled HTTP connections) before the new runtime takes over.- Parameters:
ctx (ExaRuntime)
- Return type:
None
- static scoped(ctx)#
Context manager to temporarily override the runtime.
- Parameters:
ctx (ExaRuntime)
- Return type:
- static clear()#
Forcefully clear the entire runtime stack, including active scopes.
Closes (see
ExecutorInterface.close()andStorageInterface.close()) every executor and storage in the stack before discarding it, so any resources they own (e.g. in-process background threads, pooled HTTP connections) are released instead of leaked.- Return type:
None
Inheritance
