Jenkinsfile for training model
Some checks failed
s444498-training/pipeline/head There was a failure building this commit
Some checks failed
s444498-training/pipeline/head There was a failure building this commit
This commit is contained in:
parent
f1ee669eb6
commit
5cec765150
58
Jenkinsfile-training
Normal file
58
Jenkinsfile-training
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
pipeline {
|
||||||
|
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
|
||||||
|
)
|
||||||
|
gitParameter branchFilter: 'origin/(.*)', defaultValue: 'main', name: 'BRANCH', type: 'PT_BRANCH'
|
||||||
|
buildSelector(
|
||||||
|
defaultSelector: lastSuccessful(),
|
||||||
|
description: 'Which build to use for copying artifacts',
|
||||||
|
name: 'BUILD_SELECTOR'
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
agent {
|
||||||
|
docker {
|
||||||
|
image 's444498-create-dataset'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Train model') {
|
||||||
|
steps {
|
||||||
|
sh "python neutral_network.py -e ${params.EPOCHS} -b ${params.BATCHSIZE}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
environment {
|
||||||
|
NOTIFICATION_ADDRESS = 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
|
||||||
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
success {
|
||||||
|
emailext body: 'SUCCESS', subject: "${env.JOB_NAME}", to: "${env.NOTIFICATION_ADDRESS}"
|
||||||
|
}
|
||||||
|
|
||||||
|
failure {
|
||||||
|
emailext body: 'FAILURE', subject: "${env.JOB_NAME}", to: "${env.NOTIFICATION_ADDRESS}"
|
||||||
|
}
|
||||||
|
|
||||||
|
unstable {
|
||||||
|
emailext body: 'UNSTABLE', subject: "${env.JOB_NAME}", to: "${env.NOTIFICATION_ADDRESS}"
|
||||||
|
}
|
||||||
|
|
||||||
|
changed {
|
||||||
|
emailext body: 'CHANGED', subject: "${env.JOB_NAME}", to: "${env.NOTIFICATION_ADDRESS}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user