MMMWrapper.predict_stream#

MMMWrapper.predict_stream(context, model_input, params=None)#

Evaluates a pyfunc-compatible input and produces an iterator of output. For more information about the pyfunc input API, see the pyfunc-inference-api.

Args:
context: A PythonModelContext instance containing artifacts that the model

can use to perform inference.

model_input: A pyfunc-compatible input for the model to evaluate. params: Additional parameters to pass to the model for inference.

Tip

Since MLflow 2.20.0, context parameter can be removed from predict_stream function signature if it’s not used. def predict_stream(self, model_input, params=None) is valid.