base

Module: environments.backends.base

Backend Base Class and Methods

Inheritance diagram for pySPACE.environments.backends.base:

Inheritance diagram of pySPACE.environments.backends.base

Backend

class pySPACE.environments.backends.base.Backend[source]

Bases: object

Interface for backends

All other backends must implement several methods of this interface in order to execute an operation on a specific modality.

Class Components Summary

STATES
__abstractmethods__
__del__()
__str__()
_abc_cache
_abc_negative_cache
_abc_negative_cache_version
_abc_registry
_log(message[, level]) Logs the given message with the given logging level
_start_logging() Configures and starts the logging of this operation
_stop_logging() Stops the logging of this operation
check_status() Returns a description of the current state of the operations execution.
cleanup() Remove the current operation and all potential results that
consolidate() Consolidates the results of the single processes into a consistent result of the whole
execute([timeout]) Executes all processes specified in the currently staged operation.
get_result_directory() Return the result directory of the current operation (if any)
retrieve([timeout]) Fetches the results of the operation’s processes.
stage_in(operation) Stage the current operation
__metaclass__

alias of ABCMeta

STATES = set(['consolidated', 'idling', 'executing', 'staged', 'retrieved'])
__init__()[source]
__del__()[source]
__str__()[source]
stage_in(operation)[source]

Stage the current operation

execute(timeout=1000000.0)[source]

Executes all processes specified in the currently staged operation.

Parameters:timeout (int) – The timeout for this method, after which the execution is aborted
check_status()[source]

Returns a description of the current state of the operations execution.

retrieve(timeout=1000000.0)[source]

Fetches the results of the operation’s processes.

... note:: This call might block until all processes are finished

consolidate()[source]

Consolidates the results of the single processes into a consistent result of the whole operation

cleanup()[source]

Remove the current operation and all potential results that have been stored in this object

get_result_directory()[source]

Return the result directory of the current operation (if any)

_start_logging()[source]

Configures and starts the logging of this operation

_stop_logging()[source]

Stops the logging of this operation

_log(message, level=20)[source]

Logs the given message with the given logging level

__abstractmethods__ = frozenset(['consolidate', 'check_status', 'execute', 'cleanup', 'retrieve'])
__weakref__

list of weak references to the object (if defined)

_abc_cache = <_weakrefset.WeakSet object>
_abc_negative_cache = <_weakrefset.WeakSet object>
_abc_negative_cache_version = 29
_abc_registry = <_weakrefset.WeakSet object>

create_backend()

pySPACE.environments.backends.base.create_backend(backend_type='serial')[source]

Creates the backend object based on the given options

The following backends are available: