MetaflowOfflinePredict¶
The MetaflowOfflinePredict class is a subclass of BasePredict and provides methods for running a Metaflow flow object and obtaining artifacts from the MetaflowOfflinePredict pipeline.
Attributes¶
METAFLOW_CLASS- The name of the class that inherits from metaflow'sFlowSpec
Configuration¶
Required Configuration¶
MetaflowOfflinePredict requires the following component types:
data_connectormetadata_trackerresource_version_controlmodel_explainerdata_checkerdata_profiler
Methods¶
run¶
This method loads and runs a provided Metaflow flow with the provided inputs.
def run(self, model, model_version, data, dataset_version, **kwargs)
Arguments:
model(object): The model object to use for predictions.model_version(object): The model version of the model objectdata(object): The prediction datadataset_version(object): The dataset version of the prediction data
Returns:
None
get_artifacts¶
def get_artifacts(self, artifact_keys)
Arguments:
artifact_keys(list): A list of artifact keys.
Returns:
artifacts(dict): A dictionary containing the requested artifacts.
MetaflowOfflinePredictSpec Methods¶
MetaflowOfflinePredictSpec contains the following methods. These are mirrored from the OfflinePredict class, and you should see that documentation for more information (Note: instead of these method explicitly using arguments, they instead access saved artifacts during the Metaflow run).
startcompate_dataget_predictionstrack_predictionsanalyze_prediction_driftcheck_predicitonssave_predictionsend