ium_434766/pytorch-training-eval/Jenkinsfile-train

51 lines
1.2 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-04-23 17:33:06 +02:00
}
}
stage('archiveArtifacts') {
2021-05-10 10:36:02 +02:00
steps{
archiveArtifacts 'pred.txt'
2021-04-23 17:33:06 +02:00
archiveArtifacts 'stroke.pkl'
2021-05-10 10:36:02 +02:00
}
}
stage('sendMail') {
steps{
emailext body: currentBuild.result ?: 'SUCCESS',
subject: 's434766 training',
to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
2021-05-07 21:30:35 +02:00
}
2021-05-10 10:36:02 +02:00
}
}
}