ium_434784/train.Jenkinsfile
Maciej Sobkowiak 5c77cd8402
Some checks failed
s434784-evaluation/pipeline/head This commit looks good
s434784-training/pipeline/head There was a failure building this commit
.
2021-05-17 00:37:43 +02:00

60 lines
1.6 KiB
Plaintext

pipeline {
agent any;
options {
copyArtifactPermission('s434784-evaluation_master');
}
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'
)
}
stages{
stage('copy-artifacts') {
steps {
copyArtifacts fingerprintArtifacts: true, projectName: 's434784-create-dataset', selector: buildParameter('BUILD_SELECTOR')
}
}
stage('docker-training') {
steps {
script {
def image = docker.build('dock')
image.inside{
sh 'chmod +x training.py'
sh 'chmod +x sacred_training.py'
// sh 'python3 training.py ${EPOCHS} ${BATCH_SIZE}'
sh 'python3 sacred_training.py'
}
}
}
}
stage('archive-model') {
steps{
archiveArtifacts 'suicide_model.h5'
archiveArtifacts 'sacred_runs/**'
}
}
// stage('send-mail') {
// steps{
// emailext body: currentBuild.result ?: 'SUCCESS',
// subject: 's434784-training',
// to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
// }
// }
}
}