MlflowMaasEndpointStep#
- class MlflowMaasEndpointStep(config)#
Bases:
BatchedStep
Step that uses an external MLFlow based MaaS API endpoint.
The tutorial to set up Model-as-a-Service (MaaS) within the Squirro can be found under: https://nektoon.atlassian.net/wiki/spaces/SQ/pages/2127954343/Tutorial+to+use+MaaS+with+Squirro
- Parameters:
type (str) – mlflow_maas
input_mapping (dict) – dictionary of input fields mapping: output of the prior step field (key) to the MaaS endpoint input field (value)
output_mapping (dict) – dictionary of output fields mapping: the MaaS endpoint output field (key) to output field of that step (value)
process_endpoint (str) – URL of the batched process endpoint (MaaS)
Example - In the example configuration below we assume that our MaaS requires the field ‘input’ as input and returns in the field ‘output’ the predictions. So the step’s config could look like this:
{ "name": "mlflow_maas", "step": "mlflow_maas", "type": "mlflow_maas", "input_mapping": {"body": "input"}, "output_mapping": {"output": "prediction"}, "process_endpoint": "https://localhost:<PORT>/invocations", }
Methods Summary
process_batch
(batch)Process a batch of documents.
Methods Documentation
- process_batch(batch)#
Process a batch of documents.