Próba z pliku
This commit is contained in:
parent
f6a9e8a5c6
commit
fbb9ac6a26
@ -1,6 +1,6 @@
|
||||
pipeline {
|
||||
agent {
|
||||
docker { image 'adnovac/ium_s434760:4' }
|
||||
docker { image 'adnovac/ium_s434760:4.1' }
|
||||
}
|
||||
parameters{
|
||||
buildSelector(
|
||||
@ -20,17 +20,16 @@ pipeline {
|
||||
steps
|
||||
{
|
||||
copyArtifacts(fingerprintArtifacts: true, projectName: 's434788-training/mlflow', selector: buildParameter('WHICH_BUILD'))
|
||||
sh "echo ${json_input} >> input.json"
|
||||
}
|
||||
}
|
||||
stage('test')
|
||||
{
|
||||
steps
|
||||
{
|
||||
catchError {
|
||||
sh 'python3.8 try_model.py'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('archive artifacts') {
|
||||
steps {
|
||||
archiveArtifacts 'result.txt'
|
||||
|
@ -3,6 +3,11 @@ import pandas as pd
|
||||
import json
|
||||
|
||||
model = mlflow.keras.load_model("my_model")
|
||||
data = None
|
||||
try:
|
||||
with open('input.json') as json_file:
|
||||
data = json.load(json_file)
|
||||
except:
|
||||
with open('my_model/input_example.json') as json_file:
|
||||
data = json.load(json_file)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user