jpt.mlflow_wrapper ================== .. py:module:: jpt.mlflow_wrapper Classes ------- .. autoapisummary:: jpt.mlflow_wrapper.JPTWrapper jpt.mlflow_wrapper.Schema Module Contents --------------- .. py:class:: JPTWrapper Bases: :py:obj:`mlflow.pyfunc.PythonModel` Wrapper class to load a JPT from a mlflow server instance. .. py:attribute:: model :type: Optional[jpt.trees.JPT] .. py:method:: load_context(context) This method is called when loading an MLflow model with pyfunc.load_model(), as soon as the Python Model is constructed. :param context: MLflow context where the model artifact is stored. .. py:method:: predict(context, model_input) Predict the likelihood of samples. :param context: MLflow context where the model artifact is stored. :param model_input: the input data to fit into the model. :return: the loaded model artifact. .. py:class:: Schema(variables: Iterable[jpt.variables.Variable]) Bases: :py:obj:`mlflow.types.Schema` Schema 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.