Próba z pliku

This commit is contained in:
Anna Nowak 2021-05-24 01:48:11 +02:00
parent f6a9e8a5c6
commit fbb9ac6a26
2 changed files with 10 additions and 6 deletions

View File

@ -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'

View File

@ -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)