2022-05-11 18:51:12 +02:00
|
|
|
import json
|
|
|
|
import mlflow
|
2022-05-11 19:36:36 +02:00
|
|
|
import sys
|
2022-05-11 18:51:12 +02:00
|
|
|
|
2022-05-11 19:33:00 +02:00
|
|
|
input = sys.argv[1]
|
|
|
|
|
2022-05-11 19:53:52 +02:00
|
|
|
logged_model = 'mlruns/1/3630068c31924c05a9a04e70ef35e0b8/artifacts/s444409'
|
2022-05-11 19:33:00 +02:00
|
|
|
loaded_model = mlflow.pyfunc.load_model(logged_model)
|
2022-05-11 18:51:12 +02:00
|
|
|
|
|
|
|
|
2022-05-11 19:33:00 +02:00
|
|
|
with open(f'{logged_model}/'+input) as f:
|
2022-05-11 18:51:12 +02:00
|
|
|
data = json.load(f)
|
|
|
|
|
2022-05-11 19:33:00 +02:00
|
|
|
loaded_model.predict(data['inputs'])
|