jpt.mlflow_wrapper
Classes
Wrapper class to load a JPT from a mlflow server instance. |
|
Schema class that create a mlflow schema from a jpt variable definition. |
Module Contents
- class jpt.mlflow_wrapper.JPTWrapper
Bases:
mlflow.pyfunc.PythonModelWrapper class to load a JPT from a mlflow server instance.
- model: jpt.trees.JPT | None
- load_context(context)
This method is called when loading an MLflow model with pyfunc.load_model(), as soon as the Python Model is constructed.
- Parameters:
context – MLflow context where the model artifact is stored.
- predict(context, model_input)
Predict the likelihood of samples.
- Parameters:
context – MLflow context where the model artifact is stored.
model_input – the input data to fit into the model.
- Returns:
the loaded model artifact.
- class jpt.mlflow_wrapper.Schema(variables: Iterable[jpt.variables.Variable])
Bases:
mlflow.types.SchemaSchema class that create a mlflow schema from a jpt variable definition. In the mlflow schema only the inputs are set.
Create a new schema. :param variables: An iterable of jpt variables.