ium_434766/pytorch-training-eval/Jenkinsfile-train

56 lines
1.5 KiB
Plaintext
Raw Normal View History

2021-04-23 17:33:06 +02:00
pipeline {
agent {
dockerfile true
}
2021-05-07 21:42:18 +02:00
parameters{
2021-05-07 21:55:47 +02:00
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'WHICH_BUILD'
)
2021-05-07 21:42:18 +02:00
string(
defaultValue: '16',
description: 'batch size',
name: 'BATCH_SIZE'
)
string(
defaultValue: '15',
description: 'epochs',
name: 'EPOCHS'
2021-05-10 10:24:21 +02:00
2021-05-07 21:42:18 +02:00
)
2021-05-10 10:36:02 +02:00
}
2021-04-23 17:33:06 +02:00
stages {
stage('checkout') {
steps {
2021-05-10 10:31:37 +02:00
copyArtifacts fingerprintArtifacts: true, projectName: 's434766-create-dataset', selector: buildParameter('WHICH_BUILD')
2021-04-23 17:33:06 +02:00
}
}
stage('Docker'){
steps{
2021-05-07 21:30:35 +02:00
sh 'python3 "./stroke-pytorch.py" ${BATCH_SIZE} ${EPOCHS} > pred.txt'
2021-05-13 23:17:01 +02:00
sh 'python3 "./sacred-pytorch1.py"'
sh 'python3 "./sacred-pytorch2.py"'
2021-04-23 17:33:06 +02:00
}
}
stage('archiveArtifacts') {
2021-05-10 10:36:02 +02:00
steps{
2021-05-13 23:14:39 +02:00
archiveArtifacts 'ium_s434766/**'
2021-05-10 10:36:02 +02:00
archiveArtifacts 'pred.txt'
2021-05-10 10:42:09 +02:00
archiveArtifacts 'stroke.pth'
2021-05-10 10:36:02 +02:00
}
}
2021-05-13 23:14:39 +02:00
}
post {
success {
2021-05-13 23:32:59 +02:00
build job: 's434766-evaluation/master'
2021-05-13 23:14:39 +02:00
mail body: 'SUCCESS TRAINING', subject: 's434766', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
2021-05-10 10:36:02 +02:00
2021-05-13 23:14:39 +02:00
failure {
mail body: 'FAILURE TRAINING', subject: 's434766', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
2021-05-10 10:36:02 +02:00
}
2021-05-13 23:14:39 +02:00
}
2021-05-10 10:36:02 +02:00
}