ium_434704/Jenkinsfile_train
Wojciech Jarmosz c96da734b1
All checks were successful
s434704-training/pipeline/head This commit looks good
s434704-evaluation/pipeline/head This commit looks good
Remove old model
2021-05-23 15:45:45 +02:00

47 lines
1.7 KiB
Plaintext

pipeline {
agent {
dockerfile true
}
parameters {
string(name: 'epochs', description: 'epochs number', defaultValue: '100', trim: false)
string(name: 'verbose', description: 'verbose number', defaultValue: '0', trim: false)
buildSelector(defaultSelector: lastSuccessful(), description: 'Use latest build', name: 'BUILD_SELECTOR')
gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'BRANCH', type: 'PT_BRANCH'
}
stages {
stage("Copy artifacts"){
steps {
copyArtifacts fingerprintArtifacts: true, projectName: 's434704-create-dataset', selector: buildParameter('BUILD_SELECTOR')
}
}
stage("Run training"){
steps {
sh "python3 training.py ${verbose} ${epochs}"
sh "python3 sacred_exp.py"
}
}
stage("Run MLFlow training"){
steps {
sh "rm -r movies_on_streaming_platforms_model"
sh "python3 ml_model.py ${verbose} ${epochs}"
}
}
stage('Save trained model files') {
steps{
archiveArtifacts 'movies_on_streaming_platforms_model/**'
archiveArtifacts 'sacred_file/**'
archiveArtifacts 'linear_regression.h5'
}
}
}
post {
always {
mail body: "TRAINING - ${currentBuild.currentResult}", subject: 's434704', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
success {
build job: "s434704-evaluation/${params.BRANCH}", parameters: [
gitParameter(name: 'BRANCH', value: params.BRANCH)
], wait: false
}
}
}