ium_s434700/predict-registry/predict.py

18 lines
404 B
Python
Raw Normal View History

2021-06-08 18:32:35 +02:00
import json
import mlflow
import pandas as pd
from pprint import pprint
from mlflow.tracking import MlflowClient
model_name = "s430705"
model_version = 50
mlflow.set_tracking_uri("http://172.17.0.1:5000")
model = mlflow.keras.pyfunc.load_model(
model_uri=f"models:/{model_name}/{model_version}",
)
2021-06-10 14:45:52 +02:00
client = MlflowClient()
2021-06-10 14:53:28 +02:00
print("XD: ", client.get_model_version(model_name, model_version).source)