ium_444501/s444356-reg.py

13 lines
388 B
Python
Raw Normal View History

2022-05-13 03:21:39 +02:00
import json
import mlflow
import numpy as np
path = '/mlruns/13/da5c6167bb45403fa35569849a1fbc13/artifacts/model'
model = mlflow.pyfunc.load_model(path)
with open(f'{path}/input_example.json') as file:
data = json.load(file)
input_example = np.array([data['inputs']]).reshape(-1, 2)
print('Input:\n', input_example)
print('Predictions:\n', model.predict(input_example))