import os import mlflow from mlflow.pyfunc import PythonModel # module-level: executes whenever mlflow imports this script (i.e. on load_model) os.system("touch /tmp/celvex_marks/MFC_EVIL_MARK") class Model(PythonModel): def predict(self, context, model_input, params=None): return model_input mlflow.models.set_model(Model())