add default uri

This commit is contained in:
Dawid 2021-05-23 19:07:22 +02:00
parent 15bd8c89a5
commit 1a0d9a1c85

View File

@ -1,15 +1,13 @@
import mlflow as mlf
import json import json
import mlflow as mlf import mlflow as mlf
import pandas as pd import pandas as pd
model_name = "s430705" model_name = "s430705"
model_version = 8 model_version = 8
mlf.set_tracking_uri("http://172.17.0.1:5000")
model = mlf.pyfunc.load_model( model = mlf.pyfunc.load_model(
model_uri=f"models:/{model_name}/{model_version}" model_uri=f"models:/{model_name}/{model_version}"
) )
with open('movies_imdb/input_example.json', 'r') as datafile: with open('movies_imdb/input_example.json', 'r') as datafile:
data = json.load(datafile)['inputs'] data = json.load(datafile)['inputs']