ium_444356/predict.py
Maciej Czajka 0fd7090043
Some checks are pending
s444356-training/pipeline/head Build queued...
s444356-evaluation/pipeline/head This commit looks good
update jenkinsfile_predict
2022-05-11 19:36:36 +02:00

14 lines
295 B
Python

import json
import mlflow
import sys
input = sys.argv[1]
logged_model = 'mlruns/1/fa3e620f03e64d888c364827907fb6f5/artifacts/s444409'
loaded_model = mlflow.pyfunc.load_model(logged_model)
with open(f'{logged_model}/'+input) as f:
data = json.load(f)
loaded_model.predict(data['inputs'])