From 2cb192827f7aed8fbf0dbc6e52ab6fa6f9205120 Mon Sep 17 00:00:00 2001 From: MatOgr Date: Sun, 15 May 2022 12:44:15 +0200 Subject: [PATCH] Path fix --- scripts/predict_s444356.py | 2 +- scripts/predict_s444356_registry.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/predict_s444356.py b/scripts/predict_s444356.py index 0f7f368..7bfdcce 100644 --- a/scripts/predict_s444356.py +++ b/scripts/predict_s444356.py @@ -4,7 +4,7 @@ import json model = mlflow.pyfunc.load_model( - 'mlruns/13/da5c6167bb45403fa35569849a1fbc13/artifacts/model') + '/mlruns/13/da5c6167bb45403fa35569849a1fbc13/artifacts/model') with open('input_example.json') as f: data = np.array([json.load(f)['inputs'][0]], dtype=np.float32) print(f"Predicted values: {model.predict(data.reshape(-1, 2))}") diff --git a/scripts/predict_s444356_registry.py b/scripts/predict_s444356_registry.py index 1385391..313bf7f 100644 --- a/scripts/predict_s444356_registry.py +++ b/scripts/predict_s444356_registry.py @@ -4,7 +4,7 @@ import json model = mlflow.pyfunc.load_model( - 'mlruns/13/da5c6167bb45403fa35569849a1fbc13/artifacts/model') -with open('mlruns/13/da5c6167bb45403fa35569849a1fbc13/artifacts/model/input_example.json') as f: + '/mlruns/13/da5c6167bb45403fa35569849a1fbc13/artifacts/model') +with open('/mlruns/13/da5c6167bb45403fa35569849a1fbc13/artifacts/model/input_example.json') as f: data = np.array([json.load(f)['inputs'][0]], dtype=np.float32) print(f"Predicted values: {model.predict(data.reshape(-1, 2))}")