WorkflowCalculationLayer¶
-
class
propertyestimator.layers.workflow.
WorkflowCalculationLayer
[source]¶ An calculation layer which uses the built-in workflow framework to estimate sets of physical properties.
-
__init__
()¶ Initialize self. See help(type(self)) for accurate signature.
Methods
Initialize self.
Returns the type of CalculationLayerSchema required by this layer.
schedule_calculation
(calculation_backend, …)Submit the proposed calculation to the backend of choice.
workflow_to_layer_result
(queued_properties, …)Converts a list of WorkflowResult to a list of CalculationLayerResult objects.
-
static
workflow_to_layer_result
(queued_properties, provenance, workflow_results, **_)[source]¶ Converts a list of WorkflowResult to a list of CalculationLayerResult objects.
- Parameters
queued_properties (list of PhysicalProperty) – The properties being estimated by this layer
provenance (dict of str and str) – The provenance of each property.
workflow_results (list of WorkflowResult) – The results of each workflow.
- Returns
The calculation layer result objects.
- Return type
list of CalculationLayerResult
-
abstract classmethod
required_schema_type
()¶ Returns the type of CalculationLayerSchema required by this layer.
- Returns
The required schema type.
- Return type
type of CalculationLayerSchema
-
classmethod
schedule_calculation
(calculation_backend, storage_backend, layer_directory, batch, callback, synchronous=False)¶ Submit the proposed calculation to the backend of choice.
- Parameters
calculation_backend (CalculationBackend) – The backend to the submit the calculations to.
storage_backend (StorageBackend) – The backend used to store / retrieve data from previous calculations.
layer_directory (str) – The directory in which to store all temporary calculation data from this layer.
batch (Batch) – The batch of properties to estimate with the layer.
callback (function) – The function to call when the backend returns the results (or an error).
synchronous (bool) – If true, this function will block until the calculation has completed. This is mainly intended for debugging purposes.
-