Add evaluation pipeline
This commit is contained in:
parent
435e0e8dad
commit
2656dc2f91
42
Jenkinsfile-eval
Normal file
42
Jenkinsfile-eval
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
docker {
|
||||||
|
image 's444409-create-dataset'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
environment {
|
||||||
|
NOTIFICATION_ADDRESS = 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Get previousl trend') {
|
||||||
|
steps {
|
||||||
|
copyArtifacts projectName: 's444409-evaluate', selector: lastSuccessful(), optional: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Evaluate model and write results to file') {
|
||||||
|
steps {
|
||||||
|
sh "python eval_model.py"
|
||||||
|
script {
|
||||||
|
LOSS = sh(script: 'tail -1 evaluation_results.txt', returnStdout: true).trim()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
archiveArtifacts artifacts: 'evaluation_results',
|
||||||
|
onlyIfSuccessful: true
|
||||||
|
}
|
||||||
|
|
||||||
|
success {
|
||||||
|
emailext body: "Evaluation results: RMSE:${LOSS}", subject: "${env.JOB_NAME}", to: "${env.NOTIFICATION_ADDRESS}"
|
||||||
|
}
|
||||||
|
|
||||||
|
failure {
|
||||||
|
emailext body: 'FAILURE', subject: "${env.JOB_NAME}", to: "${env.NOTIFICATION_ADDRESS}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user