From c235cf56ff171ac571b3693b72ec4afc3a686af0 Mon Sep 17 00:00:00 2001 From: Kacper Dudzic Date: Sat, 14 May 2022 14:56:26 +0200 Subject: [PATCH] Update 'predict_registry.py' --- predict_registry.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/predict_registry.py b/predict_registry.py index 01d450d..4f57561 100644 --- a/predict_registry.py +++ b/predict_registry.py @@ -2,13 +2,13 @@ import mlflow import numpy as np import json -registry_path = '/mlruns/17/4a8894c60fe34adcb79108c66d7330fc/artifacts/linear-model' # -model = mlflow.pyfunc.load_model(registry_path) # +registry_path = '/mlruns/17/4a8894c60fe34adcb79108c66d7330fc/artifacts/linear-model' +model = mlflow.pyfunc.load_model(registry_path) with open(f'{registry_path}/input_example.json') as f: input_example_data = json.load(f) -input_example = np.array(input_example_data['inputs']).reshape(-1, 8) # +input_example = np.array(input_example_data['inputs']).reshape(-1, 8) print(f'Input example: {input_example}') print(f'Model prediction: {model.predict(input_example)}')