Update 'lab8/Jenkinsfile_predict_artifact'
This commit is contained in:
parent
657d00fda3
commit
12ec9fe4fa
@ -6,7 +6,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
parameters {
|
parameters {
|
||||||
string(
|
string(
|
||||||
defaultValue: '{\\"inputs\\": [[]]}',
|
defaultValue: '{\\"inputs\\": [0, 0, 2, 904.129525, 1, 1, 20.098413, 79.10786]}',
|
||||||
description: 'Input example in json format',
|
description: 'Input example in json format',
|
||||||
name: 'INPUT'
|
name: 'INPUT'
|
||||||
)
|
)
|
||||||
@ -20,11 +20,12 @@ pipeline {
|
|||||||
stage('Stage 1') {
|
stage('Stage 1') {
|
||||||
steps {
|
steps {
|
||||||
echo 'Copying model from s444417-training...'
|
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 'Model copied'
|
||||||
echo 'Making a prediction...'
|
echo 'Making a prediction...'
|
||||||
sh 'echo ${params.INPUT} > input_example.json'
|
sh 'echo ${params.INPUT} > input_example.json'
|
||||||
sh 'python3 predict_s444356.py'
|
sh 'python3 predict_artifact.py'
|
||||||
echo 'Prediction made'
|
echo 'Prediction made'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user