ium_434766/pytorch-training-eval/Jenkinsfile-train

46 lines
1.3 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-04-23 17:33:06 +02:00
stages {
stage('checkout') {
steps {
2021-05-07 21:55:47 +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') {
steps {
2021-05-07 21:30:35 +02:00
archiveArtifacts 'pred.txt'
2021-04-23 17:33:06 +02:00
archiveArtifacts 'stroke.pkl'
}
2021-05-07 21:30:35 +02:00
post {
success {
emailext body: 'Training of stroke predictions is finished',
subject: 's434766 training finished',
to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
}
2021-04-23 17:33:06 +02:00
}
}
}