ium_s449288/lab8/predict_registry.py
2022-05-14 13:03:16 +02:00

15 lines
363 B
Python

import mlflow
import numpy as np
import json
regsistry_path = '/mlruns/17/ /artifacts/model' #
model = mlflow.pyfunc.load_model(registry_path) #
with open(f'{model}/input_example.json') as f:
input_example_data = json.load(f)
input_example = np.array() #
print(f'Input example: {input_example}')
print(f'Model prediction: {model.predict(input_example)}')