fix5
This commit is contained in:
parent
693e4729d9
commit
d0f661d8ef
@ -1,8 +1,5 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
environment {
|
|
||||||
dockerImage = ''
|
|
||||||
}
|
|
||||||
parameters {
|
parameters {
|
||||||
string(name: 'EPOCHS', defaultValue: '100', description: 'Number of epochs')
|
string(name: 'EPOCHS', defaultValue: '100', description: 'Number of epochs')
|
||||||
string(name: 'LR', defaultValue: '0.01', description: 'Learning rate')
|
string(name: 'LR', defaultValue: '0.01', description: 'Learning rate')
|
||||||
@ -13,28 +10,16 @@ pipeline {
|
|||||||
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's487194', url: 'https://git.wmi.amu.edu.pl/s487194/ium_487194']]])
|
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's487194', url: 'https://git.wmi.amu.edu.pl/s487194/ium_487194']]])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Pull Docker image') {
|
stage('Docker and Training'){
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
dockerImage = docker.image('s487194/ium:lab5')
|
def dockerImage = docker.image('s487194/ium:lab5')
|
||||||
}
|
dockerImage.inside {
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('Train model') {
|
|
||||||
steps {
|
|
||||||
script {
|
|
||||||
dockerImage.inside('-u root') {
|
|
||||||
sh "python train.py -epochs ${params.EPOCHS} -lr ${params.LR}"
|
sh "python train.py -epochs ${params.EPOCHS} -lr ${params.LR}"
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('Archive model') {
|
|
||||||
steps {
|
|
||||||
archiveArtifacts artifacts: 'classificationn_model.pt', onlyIfSuccessful: true
|
archiveArtifacts artifacts: 'classificationn_model.pt', onlyIfSuccessful: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user