ium_434766/pytorch-training-eval/Jenkinsfile

48 lines
1.4 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-04-23 17:33:06 +02:00
stages {
stage('checkout') {
steps {
2021-05-10 10:31:37 +02:00
git 'https://git.wmi.amu.edu.pl/s434766/ium_434766.git'
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
}
}
}