ium_430705/lab_09_predict_coop.py
Michał Zaręba 9bf6005939
All checks were successful
s430705-evaluation/pipeline/head This commit looks good
s430705-training/pipeline/head This commit looks good
Zaktualizuj 'lab_09_predict_coop.py'
2021-05-27 14:27:16 +02:00

22 lines
529 B
Python

import json
import mlflow
import pandas as pd
model_name = "s430705"
model_version = 30
mlflow.set_tracking_uri("http://172.17.0.1:5000")
model = mlflow.pyfunc.load_model(
model_uri=f"models:/{model_name}/{model_version}"
)
# with open('artifacts/model/input_example.json', 'r') as datafile:
# data = json.load(datafile)
# example_input = data["inputs"]
# input_dictionary = {i: x for i, x in enumerate(example_input)}
# input_ex = pd.DataFrame(input_dictionary, index=[0])
print(model.predict(input_example))