Update 'lab8/Jenkinsfile_predict_artifact'

This commit is contained in:
Kacper Dudzic 2022-05-14 15:31:54 +02:00
parent 657d00fda3
commit 12ec9fe4fa

View File

@ -6,7 +6,7 @@ pipeline {
}
parameters {
string(
defaultValue: '{\\"inputs\\": [[]]}',
defaultValue: '{\\"inputs\\": [0, 0, 2, 904.129525, 1, 1, 20.098413, 79.10786]}',
description: 'Input example in json format',
name: 'INPUT'
)
@ -20,11 +20,12 @@ pipeline {
stage('Stage 1') {
steps {
echo 'Copying model from s444417-training...'
copyArtifacts projectName: 's444417-training/master', selector: buildParameter('BUILD_SELECTOR')
copyArtifacts filter: 'mlruns.tar.gz', projectName: 's444417-training/master', selector: buildParameter('BUILD_SELECTOR')
sh 'mkdir mlruns_s444417 && tar xvzf mlruns.tar.gz -C mlruns_s444417 --strip-components 1'
echo 'Model copied'
echo 'Making a prediction...'
sh 'echo ${params.INPUT} > input_example.json'
sh 'python3 predict_s444356.py'
sh 'python3 predict_artifact.py'
echo 'Prediction made'
}
}