blob: f67a9b9ae70097efeaf215bfc59c89c529feea4e [file] [log] [blame]
#!/usr/bin/env python
# coding=utf-8
"""PredictionPreparator engine action.
Use this module to add the project main code.
"""
from .._compatibility import six
from .._logging import get_logger
from marvin_python_toolbox.engine_base import EngineBasePrediction
__all__ = ['PredictionPreparator']
logger = get_logger('prediction_preparator')
class PredictionPreparator(EngineBasePrediction):
def __init__(self, **kwargs):
super(PredictionPreparator, self).__init__(**kwargs)
def execute(self, input_message, params, **kwargs):
"""
Return a prepared input_message compatible to the predict algorithm used by the model.
Use the self.model and self.metrics objects if necessary.
"""
return input_message