2022-05-05 21:40:34 +02:00
|
|
|
pipeline {
|
2022-05-05 22:11:32 +02:00
|
|
|
parameters {
|
|
|
|
string(
|
|
|
|
defaultValue: '64',
|
|
|
|
description: 'Batch size used in ADAM',
|
|
|
|
name: 'BATCHSIZE',
|
|
|
|
trim: true
|
|
|
|
)
|
|
|
|
string(
|
|
|
|
defaultValue: '5',
|
|
|
|
description: 'Number of iterations',
|
|
|
|
name: 'EPOCHS',
|
|
|
|
trim: true
|
|
|
|
)
|
2022-05-05 23:28:25 +02:00
|
|
|
gitParameter branchFilter: 'origin/(.*)', defaultValue: 'main', name: 'BRANCH', type: 'PT_BRANCH'
|
|
|
|
buildSelector(
|
|
|
|
defaultSelector: lastSuccessful(),
|
|
|
|
description: 'Which build to use for copying artifacts',
|
|
|
|
name: 'BUILD_SELECTOR'
|
|
|
|
)
|
2022-05-05 22:11:32 +02:00
|
|
|
}
|
|
|
|
|
2022-05-05 21:40:34 +02:00
|
|
|
agent {
|
|
|
|
docker {
|
|
|
|
image 's444409-create-dataset'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stages {
|
|
|
|
stage('Train model') {
|
|
|
|
steps {
|
2022-05-06 20:43:53 +02:00
|
|
|
sh "python train_model.py with 'epochs=${params.EPOCHS}' 'batch_size=${params.BATCHSIZE}'"
|
2022-05-05 21:40:34 +02:00
|
|
|
}
|
|
|
|
}
|
2022-05-05 23:02:43 +02:00
|
|
|
stage('Archive model and evaluate it') {
|
|
|
|
steps {
|
|
|
|
archiveArtifacts artifacts: 'model_out', onlyIfSuccessful: true
|
2022-05-06 21:37:04 +02:00
|
|
|
archiveArtifacts artifacts: 'sacred_runs', onlyIfSuccessful: true
|
2022-05-05 23:28:25 +02:00
|
|
|
build job: "s444409-evaluation/${params.BRANCH}/"
|
2022-05-05 23:02:43 +02:00
|
|
|
}
|
|
|
|
}
|
2022-05-05 21:40:34 +02:00
|
|
|
}
|
|
|
|
|
2022-05-05 21:53:00 +02:00
|
|
|
environment {
|
|
|
|
NOTIFICATION_ADDRESS = 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
|
|
|
|
}
|
|
|
|
|
2022-05-05 21:40:34 +02:00
|
|
|
post {
|
2022-05-05 21:53:00 +02:00
|
|
|
success {
|
|
|
|
emailext body: 'SUCCESS', subject: "${env.JOB_NAME}", to: "${env.NOTIFICATION_ADDRESS}"
|
|
|
|
}
|
|
|
|
|
|
|
|
failure {
|
|
|
|
emailext body: 'FAILURE', subject: "${env.JOB_NAME}", to: "${env.NOTIFICATION_ADDRESS}"
|
|
|
|
}
|
|
|
|
|
|
|
|
unstable {
|
|
|
|
emailext body: 'UNSTABLE', subject: "${env.JOB_NAME}", to: "${env.NOTIFICATION_ADDRESS}"
|
|
|
|
}
|
|
|
|
|
|
|
|
changed {
|
|
|
|
emailext body: 'CHANGED', subject: "${env.JOB_NAME}", to: "${env.NOTIFICATION_ADDRESS}"
|
|
|
|
}
|
2022-05-05 21:40:34 +02:00
|
|
|
}
|
|
|
|
}
|