added prediciton from another job
This commit is contained in:
parent
f7515627a5
commit
79a4989841
@ -16,8 +16,13 @@ pipeline {
|
|||||||
stage('training') {
|
stage('training') {
|
||||||
steps {
|
steps {
|
||||||
sh 'rm -rf country_vaccination'
|
sh 'rm -rf country_vaccination'
|
||||||
sh 'chmod +x mlflow_model.py'
|
sh 'chmod +x pred_from_model.py'
|
||||||
sh 'python3 mlflow_model.py'
|
sh 'python3 pred_from_model.py'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('archiveArtifacts') {
|
||||||
|
steps{
|
||||||
|
archiveArtifacts 'movies_imdb/**'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('sendMail') {
|
stage('sendMail') {
|
||||||
|
@ -15,8 +15,8 @@ pipeline {
|
|||||||
}
|
}
|
||||||
stage('training') {
|
stage('training') {
|
||||||
steps {
|
steps {
|
||||||
//sh 'chmod +x tensor.py'
|
sh 'chmod +x tensor.py'
|
||||||
//sh 'python3 tensor.py'
|
sh 'python3 tensor.py'
|
||||||
sh 'rm -rf country_vaccination'
|
sh 'rm -rf country_vaccination'
|
||||||
sh 'chmod +x mlflow_model.py'
|
sh 'chmod +x mlflow_model.py'
|
||||||
sh 'python3 mlflow_model.py'
|
sh 'python3 mlflow_model.py'
|
||||||
|
13
pred_from_model.py
Normal file
13
pred_from_model.py
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import json
|
||||||
|
import mlflow as mlf
|
||||||
|
import pandas as pd
|
||||||
|
|
||||||
|
model = mlf.keras.load_model("country_vaccination")
|
||||||
|
|
||||||
|
|
||||||
|
with open('movies_imdb/input_example.json', 'r') as datafile:
|
||||||
|
data = json.load(datafile).inputs
|
||||||
|
|
||||||
|
input_dictionary = {idx:x for idx, x in enumerate(data)}
|
||||||
|
input_ex = pd.DataFrame([input_dictionary])
|
||||||
|
print(model.predict(input_ex))
|
Loading…
Reference in New Issue
Block a user