From 5f656b2816836401071c7f5ac9c90dfb58759c61 Mon Sep 17 00:00:00 2001 From: Dominik Strzako Date: Sun, 23 May 2021 22:19:08 +0200 Subject: [PATCH] !?!? --- Jenkinsfile_predict | 2 +- Zadanie_09_MLflow_Predict.py | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile_predict b/Jenkinsfile_predict index 2fcbe6e..52d0db4 100644 --- a/Jenkinsfile_predict +++ b/Jenkinsfile_predict @@ -13,7 +13,7 @@ pipeline { { steps { - copyArtifacts(fingerprintArtifacts: true, projectName: 's434704-training/master', selector: buildParameter('WHICH_BUILD')) + copyArtifacts(fingerprintArtifacts: true, projectName: 's434695-training/train', selector: buildParameter('WHICH_BUILD')) } } stage('predict') diff --git a/Zadanie_09_MLflow_Predict.py b/Zadanie_09_MLflow_Predict.py index 8c44897..c8e54da 100644 --- a/Zadanie_09_MLflow_Predict.py +++ b/Zadanie_09_MLflow_Predict.py @@ -1,9 +1,8 @@ import mlflow -import sys -import json +import pandas as pd + +model = mlflow.keras.load_model("my_model") +data = pd.read_json('my_model/input_example.json', orient='index') -model = mlflow.keras.load_model("movies_on_streaming_platforms_model") -with open('movies_on_streaming_platforms_model/input_example.json') as json_file: - data = json.load(json_file) print(data) print(model.predict(data)) \ No newline at end of file