.
All checks were successful
s444501-training/pipeline/head This commit looks good
s444501-evaluation/pipeline/head This commit looks good

This commit is contained in:
s444501 2022-05-01 17:19:50 +02:00
parent 54b9dab048
commit 23a9d735c5
3 changed files with 15 additions and 11 deletions

View File

@ -17,6 +17,7 @@ WORKDIR /ium
COPY ./ium-data.py ./
COPY ./download.sh ./
COPY ./biblioteki_ml.py ./
COPY ./eval.py ./
ARG KAGGLE_KEY
ARG KAGGLE_USERNAME

View File

@ -3,40 +3,38 @@ pipeline {
docker {image 'zadanie'}
}
parameters {
gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'BRANCH', type: 'PT_BRANCH'
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'BUILD_SELECTOR'
)
string(
defaultValue: '100',
description: 'number of epochs',
name: 'EPOCH'
)
}
stages {
stage('Copy artifacts') {
steps {
copyArtifacts fingerprintArtifacts: true, projectName: 's444501-create-dataset', selector: buildParameter('BUILD_SELECTOR')
copyArtifacts fingerprintArtifacts: true, projectName: 's444501-training/${BRANCH}', selector: buildParameter('BUILD_SELECTOR')
copyArtifacts fingerprintArtifacts: true, projectName: 's444501-evaluation/master', selector: buildParameter('BUILD_SELECTOR'), optional: true
}
}
stage('Train model') {
stage('Evaluate model') {
steps {
withEnv(["EPOCH=${params.EPOCH}"]) {
sh 'python biblioteki_ml.py $EPOCH'
withEnv([]) {
sh 'python eval.py'
}
}
}
stage('Archive model') {
steps {
archiveArtifacts artifacts: 'model.pkl, neural_network_prediction_results.csv'
archiveArtifacts artifacts: 'eval_results.json, metrics.png'
}
}
}
post {
always {
emailext body: "${currentBuild.currentResult}", subject: 's444501-training', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
emailext body: "${currentBuild.currentResult}", subject: 's444501-evaluation', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
}
}

View File

@ -33,6 +33,11 @@ pipeline {
archiveArtifacts artifacts: 'model.pkl, neural_network_prediction_results.csv'
}
}
stage ('Model - evaluation') {
steps {
build job: 's444501-evaluation/master', wait: false
}
}
}
post {
always {