From 1e526fa5a0bcf6b9340eb192b78da2f45b8398cc Mon Sep 17 00:00:00 2001 From: MatOgr Date: Sun, 15 May 2022 13:06:10 +0200 Subject: [PATCH] Path slash fix test --- scripts/predict_s444356_registry.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/predict_s444356_registry.py b/scripts/predict_s444356_registry.py index 5237ad7..8b2d1cd 100644 --- a/scripts/predict_s444356_registry.py +++ b/scripts/predict_s444356_registry.py @@ -5,8 +5,8 @@ import os print('################\n\n', os.listdir('scripts/'), "\n\n###############") -model = mlflow.pyfunc.load_model( - 'mlruns/13/da5c6167bb45403fa35569849a1fbc13/artifacts/model') -with open('mlruns/13/da5c6167bb45403fa35569849a1fbc13/artifacts/model/input_example.json') as f: +model = mlflow.pyfunc.load_model('/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.float64) print(f"Predicted values: {model.predict(data.reshape(-1, 2))}")