Update 'lab7/Jenkinsfile_eval'
This commit is contained in:
parent
8e3e206cca
commit
8876616c56
@ -15,29 +15,30 @@ pipeline {
|
||||
stages {
|
||||
stage('Stage 1') {
|
||||
steps {
|
||||
sh 'cd lab7/'
|
||||
git branch: "${params.BRANCH}", url: 'https://git.wmi.amu.edu.pl/s449288/ium_s449288.git'
|
||||
sh 'chmod u+x ./lab7/evaluate.py'
|
||||
sh 'chmod u+x ./evaluate.py'
|
||||
echo 'Copying datasets from the create-dataset job...'
|
||||
copyArtifacts filter: 'lab7/lego_sets_clean_test.csv', projectName: 's449288-create-dataset'
|
||||
copyArtifacts filter: 'lego_sets_clean_test.csv', projectName: 's449288-create-dataset'
|
||||
echo 'Datasets copied'
|
||||
echo 'Copying model from the training job...'
|
||||
copyArtifacts filter: 'lab7/lego_reg_model.tar.gz', projectName: "s449288-training/${BRANCH}/", selector: buildParameter('BUILD_SELECTOR')
|
||||
copyArtifacts filter: 'lego_reg_model.tar.gz', projectName: "s449288-training/${BRANCH}/", selector: buildParameter('BUILD_SELECTOR')
|
||||
echo 'Model copied'
|
||||
sh 'tar xvzf lab7/lego_reg_model.tar.gz'
|
||||
sh 'tar xvzf lego_reg_model.tar.gz'
|
||||
echo 'Optional copying of the metrics file from previous build...'
|
||||
copyArtifacts filter: 'lab7/eval_results.txt', projectName: 's449288-evaluation/master/', optional: true
|
||||
copyArtifacts filter: 'eval_results.txt', projectName: 's449288-evaluation/master/', optional: true
|
||||
echo 'Metrics file copied if it did not exist'
|
||||
echo 'Evaluating model...'
|
||||
sh 'python3 lab7/evaluate.py'
|
||||
sh 'python3 evaluate.py'
|
||||
echo 'Model evaluated. Metrics saved. Plot saved.'
|
||||
sh 'head lab7/eval_results.txt'
|
||||
sh 'file lab7/error_plot.jpg'
|
||||
sh 'head eval_results.txt'
|
||||
sh 'file error_plot.jpg'
|
||||
echo 'Archiving metrics file...'
|
||||
archiveArtifacts 'lab7/eval_results.txt'
|
||||
archiveArtifacts 'eval_results.txt'
|
||||
echo 'File archived'
|
||||
script {
|
||||
LAST_MAE = sh (
|
||||
script: 'tail -1 lab7/eval_results.txt',
|
||||
script: 'tail -1 eval_results.txt',
|
||||
returnStdout: true
|
||||
).trim()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user