predict from registry test
This commit is contained in:
parent
6a33d840db
commit
1d06ce26b8
22
predict-registry/Jenkinsfile
vendored
Normal file
22
predict-registry/Jenkinsfile
vendored
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
14
predict-registry/predict.py
Normal file
14
predict-registry/predict.py
Normal 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}",
|
||||
)
|
Loading…
Reference in New Issue
Block a user