From 6be2c8a3eb90df41ae3d434d29ac278a7291b400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Zar=C4=99ba?= Date: Thu, 27 May 2021 14:50:41 +0200 Subject: [PATCH] Zaktualizuj 'lab_09_predict_coop.py' --- lab_09_predict_coop.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lab_09_predict_coop.py b/lab_09_predict_coop.py index bd0016b..7fcfe85 100644 --- a/lab_09_predict_coop.py +++ b/lab_09_predict_coop.py @@ -1,7 +1,8 @@ import json import mlflow import pandas as pd - +from pprint import pprint +from mlflow.tracking import MlflowClient model_name = "s430705" model_version = 30 @@ -11,6 +12,9 @@ mlflow.set_tracking_uri("http://172.17.0.1:5000") model = mlflow.pyfunc.load_model( model_uri=f"models:/{model_name}/{model_version}" ) +client = MlflowClient() +for mv in client.search_model_versions("name='s430705'"): + pprint(dict(mv), indent=4) with open('/tmp/mlruns/0/6be4f90846214df8913a553bc53b1019/artifacts/movies_imdb2/input_example.json', 'r') as datafile: data = json.load(datafile)