File size: 344 Bytes
672e846 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 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())
|