563993e596
Some checks failed
s464980-training/pipeline/head There was a failure building this commit
52 lines
1.6 KiB
Groovy
52 lines
1.6 KiB
Groovy
pipeline {
|
|
agent any
|
|
parameters {
|
|
buildSelector (
|
|
defaultSelector: lastSuccessful(),
|
|
description: 'Which build to use for copying artifacts',
|
|
name: 'BUILD_SELECTOR'
|
|
)
|
|
string (
|
|
name: 'EPOCHS',
|
|
defaultValue: '35',
|
|
description: 'Epochs to train'
|
|
)
|
|
}
|
|
stages {
|
|
stage('Checkout repository') {
|
|
steps {
|
|
checkout scm
|
|
}
|
|
}
|
|
stage('Copy artifacts') {
|
|
steps {
|
|
copyArtifacts fingerprintArtifacts: true, projectName: 'z-s464980-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
|
}
|
|
}
|
|
stage("Training") {
|
|
agent {
|
|
dockerfile {
|
|
filename 'Dockerfile'
|
|
reuseNode true
|
|
}
|
|
}
|
|
|
|
steps {
|
|
withCredentials([sshUserPrivateKey(credentialsId: '48ac7004-216e-4260-abba-1fe5db753e18', keyFileVariable: 'IUM_SFTP_KEY')]) {
|
|
sh 'dvc remote modify --local ium_ssh_remote keyfile $IUM_SFTP_KEY'
|
|
sh "dvc pull"
|
|
}
|
|
sh "python ./train.py --epochs ${params.EPOCHS}"
|
|
archiveArtifacts artifacts: 'model.keras', onlyIfSuccessful: true
|
|
}
|
|
}
|
|
stage('Run training'){
|
|
steps{
|
|
script {
|
|
build(job: 's464980-evaluation/master')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|