predict firest sr test
This commit is contained in:
parent
c64c08e255
commit
58c2b11f4f
2
learning/Jenkinsfile
vendored
2
learning/Jenkinsfile
vendored
@ -21,10 +21,8 @@ pipeline {
|
|||||||
stage('learning') {
|
stage('learning') {
|
||||||
steps {
|
steps {
|
||||||
sh 'python ./learning/ml.py'
|
sh 'python ./learning/ml.py'
|
||||||
sh "python ./learning/ml-mlflow.py"
|
|
||||||
sh "export MLFLOW_TRACKING_URI=http://172.17.0.1:5000"
|
sh "export MLFLOW_TRACKING_URI=http://172.17.0.1:5000"
|
||||||
sh "python ./learning/ml-mlflow.py"
|
sh "python ./learning/ml-mlflow.py"
|
||||||
sh "ls -l"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('archiveArtifacts') {
|
stage('archiveArtifacts') {
|
||||||
|
1
predict/Jenkinsfile
vendored
1
predict/Jenkinsfile
vendored
@ -17,6 +17,7 @@ pipeline {
|
|||||||
sh 'ls -l'
|
sh 'ls -l'
|
||||||
sh 'ls -l ./prediction_data'
|
sh 'ls -l ./prediction_data'
|
||||||
sh 'ls -l ./prediction_data/movies_imdb'
|
sh 'ls -l ./prediction_data/movies_imdb'
|
||||||
|
sh 'python ./predict.py'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,15 @@
|
|||||||
|
import json
|
||||||
|
import mlflow
|
||||||
|
import pandas as pd
|
||||||
|
|
||||||
|
|
||||||
|
model = mlflow.keras.load_model("./prediction_data/movies_imdb/MLmodel")
|
||||||
|
|
||||||
|
|
||||||
|
with open('./prediction_data/movies_imdb/input_example.json', 'r') as datafile:
|
||||||
|
data = json.load(datafile)
|
||||||
|
example_input = data["inputs"]
|
||||||
|
|
||||||
|
input_dictionary = {i: x for i, x in enumerate(example_input)}
|
||||||
|
input_ex = pd.DataFrame(input_dictionary, index=[0])
|
||||||
|
print(model.predict(input_ex))
|
Loading…
Reference in New Issue
Block a user