This commit is contained in:
Dominik Strzako 2021-05-27 12:43:23 +02:00
parent 2244eb2ff6
commit 2cb6062a0d
2 changed files with 5 additions and 5 deletions

View File

@ -18,7 +18,7 @@ pipeline {
{ {
steps steps
{ {
copyArtifacts(fingerprintArtifacts: true, projectName: 's434788-training/mlflow', selector: buildParameter('WHICH_BUILD')) copyArtifacts(fingerprintArtifacts: true, projectName: 's434695-training/train', selector: buildParameter('WHICH_BUILD'))
} }
} }
stage('predict') stage('predict')

View File

@ -4,11 +4,11 @@ import pandas as pd
mlflow.set_tracking_uri("http://172.17.0.1:5000") mlflow.set_tracking_uri("http://172.17.0.1:5000")
client = MlflowClient() client = MlflowClient()
version = 0 version = "c579d6"
model_name = "s434788" model_name = "s434788"
for mv in client.search_model_versions(f"name='{model_name}'"): #for mv in client.search_model_versions(f"name='{model_name}'"):
if int(mv.version) > version: # if int(mv.version) > version:
version = int(mv.version) # version = int(mv.version)
model = mlflow.keras.load_model( model = mlflow.keras.load_model(
model_uri=f"models:/{model_name}/{version}" model_uri=f"models:/{model_name}/{version}"