sampo.api.ProcessResultLoader¶
-
class
sampo.api.
ProcessResultLoader
(*args, **kwargs)¶ Process execution result loader.
Users can access the execution results in the process store through object of this class.
load_comp_output¶
-
ProcessResultLoader.
load_comp_output
(self, cid)¶ Loads output data of specified component from the ProcessStore.
- Parameters
- cidstr
Component ID.
- Returns
- output_dfpandas.DataFrame
Loaded output data. The loaded output data contains the attributes as described in the component’s Output Attributes section.
Examples
>>> from sampo.api import process_store >>> with process_store.open_process('tmpstore', 'fabhmerg_predict') as prl: ... output_df = prl.load_comp_output('rg')
load_model¶
-
ProcessResultLoader.
load_model
(self, cid)¶ Loads model parameters of specified component from the ProcessStore.
- Parameters
- cidstr
Component ID.
- Returns
- model_paramsdict or None
Loaded model parameters. Keys and values are dependent on the model of specified component. Components with no models return None.
Examples
>>> from sampo.api import process_store >>> with process_store.open_process('tmpstore', 'fabhmerg_predict') as prl: ... model = prl.load_model('rg')
load_comp_output_attr_schema¶
-
ProcessResultLoader.
load_comp_output_attr_schema
(self, cid)¶ Loads output attribute schema description of the component from the ProcessStore.
- Returns
- asd_objectOrderedDict
Loaded attribute schema description. The schema description contains the attributes as described in the component’s Output Attributes section. Each attribute in the dictionary follows the attribute patterns described in the ASD Specification.
Examples
>>> from sampo.api import process_store >>> with process_store.open_process('tmpstore', 'fabhmerg_predict') as prl: ... asd = prl.load_comp_output_attr_schema('rg')
load_comp_output_evaluation¶
-
ProcessResultLoader.
load_comp_output_evaluation
(self, cid)¶ Loads the evaluation result of a prediction result from the ProcessStore.
- Parameters
- cidstr
Component ID.
- Returns
- evaluate_dfpandas.DataFrame or None
Evaluation of prediction results. Evaluations are based on the component evaluation indices. Components with no prediction result evaluation return None.
Examples
>>> from sampo.api import process_store >>> with process_store.open_process('tmpstore', 'fabhmerg_predict') as prl: ... evaluate_df = prl.load_comp_output_evaluation('fabrg1')