mlflow attempt task 2 prediction registry
This commit is contained in:
parent
4e4c2fd1ef
commit
2516052abb
@ -7,6 +7,7 @@ import sys
|
|||||||
PATH = "/mlruns/14/80fe21a0804844088147d15a3cebb3e5/artifacts/lego-model"
|
PATH = "/mlruns/14/80fe21a0804844088147d15a3cebb3e5/artifacts/lego-model"
|
||||||
model = mlflow.pyfunc.load_model(PATH)
|
model = mlflow.pyfunc.load_model(PATH)
|
||||||
|
|
||||||
with open(f'{model}/{(sys.argv[1:])[0]}', 'r') as file:
|
input = str((sys.argv[1:])[0])
|
||||||
|
with open(f'{PATH}/{input}', 'r') as file:
|
||||||
json_data = json.load(file)
|
json_data = json.load(file)
|
||||||
print(f"Prediction: {model.predict(np.array([json_data['inputs']]))}")
|
print(f"Prediction: {model.predict(np.array([json_data['inputs']]))}")
|
||||||
|
Loading…
Reference in New Issue
Block a user