predict from registry test

This commit is contained in:
Filip Izydorczyk 2021-06-08 18:32:35 +02:00
parent 6a33d840db
commit 1d06ce26b8
2 changed files with 36 additions and 0 deletions

22
predict-registry/Jenkinsfile vendored Normal file
View File

@ -0,0 +1,22 @@
pipeline {
agent {dockerfile true}
stages {
stage('Copy Archive') {
steps {
script {
step ([$class: 'CopyArtifact',
projectName: 's430705-training/master',
target: 'prediction_data'])
}
}
}
stage('Predict example value'){
steps {
sh "cd /tmp"
sh "ls -al"
}
}
}
}

View File

@ -0,0 +1,14 @@
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}",
)