diff --git a/predict_registry.py b/predict_registry.py index c291fa7..62c9e68 100644 --- a/predict_registry.py +++ b/predict_registry.py @@ -4,12 +4,16 @@ import numpy as np import sys -PATH = "mlruns/14/80fe21a0804844088147d15a3cebb3e5/artifacts/lego-model" +PATH = "/mlruns/14/80fe21a0804844088147d15a3cebb3e5/artifacts/lego-model" +model_version = 14 +model_name = "s449288" -model = mlflow.pyfunc.load_model(PATH) +model = mlflow.pyfunc.load_model( + model_uri=f"models:/{model_name}/{model_version}" +) with open(f'{PATH}/{(sys.argv[1:])[0]}', 'r') as file: json_data = json.load(file) - print(f"Prediction: {model.predict(np.array([json_data['inputs']]))}") + print(f"Prediction: {model.predict(np.array([500]))}") \ No newline at end of file