ium_444498/Jenkinsfile-training
Mateusz 24cf18df57
All checks were successful
s444498-evaluation/pipeline/head This commit looks good
s444498-training/pipeline/head This commit looks good
sacred apply
2022-05-09 18:23:36 +02:00

64 lines
1.9 KiB
Plaintext

pipeline {
agent {
dockerfile true
}
parameters {
string(
defaultValue: '64',
description: 'Batch size used in gradient',
name: 'BATCHSIZE',
trim: true
)
string(
defaultValue: '5',
description: 'Number of iterations',
name: 'EPOCHS',
trim: true
)
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'BUILD_SELECTOR'
)
}
stages {
stage('Copy artifacts') {
steps {
copyArtifacts fingerprintArtifacts: true, projectName: 's444498-create-dataset', selector: buildParameter('BUILD_SELECTOR')
}
}
stage('Train model') {
steps {
sh "chmod u+x ./neutral_network.py"
sh "python3 neutral_network.py with 'epochs=${params.EPOCHS}' 'batch_size=${params.BATCHSIZE}'"
}
}
stage('Archive model') {
steps {
archiveArtifacts artifacts: 'model.zip', onlyIfSuccessful: true
archiveArtifacts artifacts: 'sacred_runs/**', onlyIfSuccessful: true
}
}
}
post {
success {
emailext body: "SUCCESS", subject: "s444498-training", to: "e19191c5.uam.onmicrosoft.com@emea.teams.ms"
build job: "s444498-evaluation/master"
}
failure {
emailext body: "FAILURE", subject: "s444498-training", to: "e19191c5.uam.onmicrosoft.com@emea.teams.ms"
}
unstable {
emailext body: 'UNSTABLE', subject: "s444498-training", to: "e19191c5.uam.onmicrosoft.com@emea.teams.ms"
}
changed {
emailext body: 'CHANGED', subject: "s444498-training", to: "e19191c5.uam.onmicrosoft.com@emea.teams.ms"
}
}
}