34 lines
1.1 KiB
Plaintext
34 lines
1.1 KiB
Plaintext
pipeline {
|
|
agent {
|
|
docker {
|
|
image 's444507_create_dataset_image:latest'
|
|
args '-v /mlruns:/mlruns'
|
|
}
|
|
}
|
|
parameters {
|
|
string(name: 'epoch', defaultValue: '100', description: 'Number of epochs to train model.')
|
|
}
|
|
stages {
|
|
stage('Get artifacts') {
|
|
steps {
|
|
copyArtifacts fingerprintArtifacts: true, projectName: 's444507-create-dataset', selector: lastSuccessful()
|
|
}
|
|
}
|
|
stage('Run mlflow script and save artifacts') {
|
|
steps {
|
|
sh "python3 lab08_deepLearining_mlflow.py $epoch"
|
|
archiveArtifacts artifacts: 'CarPrices_pytorch_model.pkl'
|
|
archiveArtifacts artifacts: 'mlruns/**'
|
|
archiveArtifacts artifacts: 'my_model/**'
|
|
sh 'rm -r mlruns'
|
|
sh 'rm -r my_model'
|
|
build job: 's444507-evaluation/master/'
|
|
}
|
|
}
|
|
}
|
|
post {
|
|
always {
|
|
emailext body: "${currentBuild.currentResult}", subject: 's444507-training', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
|
|
}
|
|
}
|
|
} |