ium_444498/Jenkinsfile-training

64 lines
1.9 KiB
Plaintext
Raw Permalink Normal View History

2022-05-06 20:19:47 +02:00
pipeline {
2022-05-08 17:12:22 +02:00
agent {
dockerfile true
}
2022-05-06 20:19:47 +02:00
parameters {
string(
defaultValue: '64',
description: 'Batch size used in gradient',
name: 'BATCHSIZE',
trim: true
)
string(
defaultValue: '5',
description: 'Number of iterations',
name: 'EPOCHS',
trim: true
)
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'BUILD_SELECTOR'
)
}
stages {
2022-05-08 17:12:22 +02:00
stage('Copy artifacts') {
steps {
copyArtifacts fingerprintArtifacts: true, projectName: 's444498-create-dataset', selector: buildParameter('BUILD_SELECTOR')
}
}
2022-05-06 20:19:47 +02:00
stage('Train model') {
steps {
2022-05-08 17:12:22 +02:00
sh "chmod u+x ./neutral_network.py"
2022-05-09 17:07:25 +02:00
sh "python3 neutral_network.py with 'epochs=${params.EPOCHS}' 'batch_size=${params.BATCHSIZE}'"
2022-05-08 17:12:22 +02:00
}
}
stage('Archive model') {
steps {
2022-05-09 17:07:25 +02:00
archiveArtifacts artifacts: 'model.zip', onlyIfSuccessful: true
archiveArtifacts artifacts: 'sacred_runs/**', onlyIfSuccessful: true
2022-05-06 20:19:47 +02:00
}
}
}
post {
success {
2022-05-08 17:12:22 +02:00
emailext body: "SUCCESS", subject: "s444498-training", to: "e19191c5.uam.onmicrosoft.com@emea.teams.ms"
2022-05-08 20:13:10 +02:00
build job: "s444498-evaluation/master"
2022-05-06 20:19:47 +02:00
}
failure {
2022-05-08 17:12:22 +02:00
emailext body: "FAILURE", subject: "s444498-training", to: "e19191c5.uam.onmicrosoft.com@emea.teams.ms"
2022-05-06 20:19:47 +02:00
}
unstable {
2022-05-08 17:12:22 +02:00
emailext body: 'UNSTABLE', subject: "s444498-training", to: "e19191c5.uam.onmicrosoft.com@emea.teams.ms"
2022-05-06 20:19:47 +02:00
}
changed {
2022-05-08 17:12:22 +02:00
emailext body: 'CHANGED', subject: "s444498-training", to: "e19191c5.uam.onmicrosoft.com@emea.teams.ms"
}
2022-05-06 20:19:47 +02:00
}
}