ium_434784/train.Jenkinsfile

60 lines
1.6 KiB
Plaintext
Raw Normal View History

2021-05-16 16:05:03 +02:00
pipeline {
agent any;
2021-05-16 21:44:39 +02:00
options {
2021-05-16 21:51:38 +02:00
copyArtifactPermission('s434784-evaluation_master');
2021-05-16 21:44:39 +02:00
}
2021-05-16 16:53:00 +02:00
parameters{
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'BUILD_SELECTOR'
)
string(
defaultValue: '10',
description: 'batch size',
name: 'BATCH_SIZE'
)
string(
defaultValue: '5',
description: 'epochs',
name: 'EPOCHS'
)
}
2021-05-16 16:07:21 +02:00
stages{
2021-05-16 17:06:35 +02:00
stage('copy-artifacts') {
2021-05-16 16:53:00 +02:00
steps {
copyArtifacts fingerprintArtifacts: true, projectName: 's434784-create-dataset', selector: buildParameter('BUILD_SELECTOR')
}
}
2021-05-16 16:05:03 +02:00
stage('docker-training') {
steps {
script {
def image = docker.build('dock')
image.inside{
2021-05-16 16:11:21 +02:00
sh 'chmod +x training.py'
2021-05-17 00:26:29 +02:00
sh 'chmod +x sacred_training.py'
2021-05-17 00:37:43 +02:00
// sh 'python3 training.py ${EPOCHS} ${BATCH_SIZE}'
2021-05-17 00:26:29 +02:00
sh 'python3 sacred_training.py'
2021-05-16 16:05:03 +02:00
}
}
}
}
2021-05-16 17:06:35 +02:00
stage('archive-model') {
steps{
2021-05-16 19:41:13 +02:00
archiveArtifacts 'suicide_model.h5'
2021-05-17 00:37:43 +02:00
archiveArtifacts 'sacred_runs/**'
2021-05-16 17:06:35 +02:00
}
}
2021-05-17 00:37:43 +02:00
// stage('send-mail') {
// steps{
// emailext body: currentBuild.result ?: 'SUCCESS',
// subject: 's434784-training',
// to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
// }
// }
2021-05-16 16:07:21 +02:00
}
}