2023-05-10 15:11:42 +02:00
|
|
|
pipeline {
|
2023-05-10 23:54:43 +02:00
|
|
|
agent any
|
2023-05-10 21:28:35 +02:00
|
|
|
environment {
|
2023-05-10 23:57:56 +02:00
|
|
|
PATH = "/path/to/your/python/bin:${env.PATH}"
|
2023-05-10 21:28:35 +02:00
|
|
|
SACRED_IGNORE_GIT = 'TRUE'
|
|
|
|
}
|
2023-05-10 15:11:42 +02:00
|
|
|
parameters {
|
2023-05-10 15:36:16 +02:00
|
|
|
string(name: 'EPOCHS', defaultValue: '10', description: 'Liczba Epok')
|
2023-05-10 15:11:42 +02:00
|
|
|
}
|
|
|
|
stages {
|
2023-05-11 00:00:27 +02:00
|
|
|
stage('Przygotuj') {
|
2023-05-10 16:57:40 +02:00
|
|
|
steps {
|
2023-05-11 00:00:27 +02:00
|
|
|
sh 'python -m pip install pandas tensorflow scikit-learn imbalanced-learn sacred pymongo mlflow'
|
2023-05-10 16:57:40 +02:00
|
|
|
}
|
|
|
|
}
|
2023-05-10 15:11:42 +02:00
|
|
|
stage('Pobierz dane') {
|
|
|
|
steps {
|
|
|
|
script {
|
2023-05-10 16:46:45 +02:00
|
|
|
copyArtifacts(projectName: 's487187-create-dataset', fingerprintArtifacts: true)
|
2023-05-10 15:11:42 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Trenuj model') {
|
|
|
|
steps {
|
|
|
|
script {
|
2023-05-10 22:49:14 +02:00
|
|
|
sh 'mlflow run . -P epochs=$EPOCHS'
|
2023-05-10 15:11:42 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Zarchiwizuj model') {
|
|
|
|
steps {
|
2023-05-10 22:49:14 +02:00
|
|
|
sh '''
|
|
|
|
mkdir -p model
|
|
|
|
cp -r mlruns/* model/
|
|
|
|
'''
|
|
|
|
archiveArtifacts artifacts: 'model/**', fingerprint: true
|
2023-05-10 15:11:42 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-05-10 17:08:50 +02:00
|
|
|
}
|