Results
covalent.get_result
Get the results of a dispatch from the Covalent server.
Parameters
dispatch_id (str
) – The dispatch id of the result.
wait (bool
) – Controls how long the method waits for the server to return a result. If False, the method will not wait and will return the current status of the workflow. If True, the method will wait for the result to finish and keep retrying for sys.maxsize.
dispatcher_addr (Optional
[str
]) – Dispatcher server address, if None then defaults to the address set in Covalent’s config.
status_only (bool
) – If true, only returns result status, not the full result object, default is False.
Return Type
Returns
The Result object from the Covalent server
Result class to store and perform operations on the result obtained from a dispatch.
lattice
"Lattice" object which was dispatched.
results_dir
results_dir
dispatch_id
Dispatch id assigned to this dispatch.
root_dispatch_id
Dispatch id of the root lattice in a hierarchy of sublattice workflows.
status
Status of the result. It’ll be one of the following: - Result.NEW_OBJ: When it is a new result object. - Result.COMPLETED: When processing of all the nodes has completed successfully. - Result.RUNNING: When some node executions are in process. - Result.FAILED: When one or more node executions have failed. - Result.CANCELED: When the dispatch was canceled.
result
Final result of the dispatch, i.e., whatever the "Lattice" was returning as a function.
inputs
Inputs sent to the "Lattice" function for dispatching.
error
Error due to which the execution failed.
Functions
save_result: Save the result object to the passed results directory or to self.results_dir by default.
get_all_node_outputs: Return all the outputs of all the node executions.
Attributes:
Dispatch id of current dispatch.
Encoded final result of current dispatch
End time of processing the dispatch.
Error due to which the dispatch failed.
Inputs sent to the “Lattice” function for dispatching.
“Lattice” object which was dispatched.
Final result of the current dispatch.
Results directory used to save this result object.
Dispatch id of the root dispatch
Start time of processing the dispatch.
Status of the current dispatch.
Methods:
Return output of every node execution.
Get all the node results.
get_node_result
(node_id)
Return the result of a particular node.
Post-processing method
property encoded_result: covalent.TransportableObject
Encoded final result of current dispatch.
Return Type
TransportableObject
Return output of every node execution.
Parameters
None -
Returns
A dictionary containing the output of every node execution.
Return Type
node_outputs
Get all the node results.
Parameters
None -
Returns
A list of dictionaries containing the result of every node execution.
Return Type
node_results
Return the result of a particular node.
Parameters
node_id (int) – The node id.
Return Type
node_result
Returns
The result of the node containing below in a dictionary format:
property lattice: covalent._workflow.lattice.Lattice
“Lattice” object which was dispatched.
Return Type
Lattice
Post-processing method. This method was introduced to enable manual client-side postprocessing in case automatic post-processing by the server fails (e.g. insufficient dask worker memory)
Returns
Post-processed result output
Return Type
Any
property result: Union[int, float, list, dict]
Final result of current dispatch.
Return Type
Union
[int
, float
, list
, dict
]