2024-04-19 10:34:35 +02:00
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
|
2024-04-19 11:03:31 +02:00
|
|
|
parameters {
|
2024-04-19 11:08:18 +02:00
|
|
|
string(
|
|
|
|
name: 'epochs',
|
|
|
|
defaultValue: '1000',
|
|
|
|
description: 'Number of epochs for training'
|
|
|
|
)
|
|
|
|
string(
|
|
|
|
name: 'learning_rate',
|
|
|
|
defaultValue: '0.001',
|
|
|
|
description: 'Learning rate for training'
|
|
|
|
)
|
|
|
|
string(
|
|
|
|
name: 'weight_decay',
|
|
|
|
defaultValue: '0.001',
|
|
|
|
description: 'Regularization parameter for training'
|
|
|
|
)
|
2024-04-19 11:03:31 +02:00
|
|
|
}
|
|
|
|
|
2024-04-19 10:34:35 +02:00
|
|
|
stages {
|
|
|
|
stage('Clone repository') {
|
|
|
|
steps {
|
|
|
|
checkout scm
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('Copy artifacts') {
|
|
|
|
agent {
|
|
|
|
dockerfile {
|
|
|
|
filename 'Dockerfile'
|
|
|
|
reuseNode true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
steps {
|
|
|
|
copyArtifacts(projectName: 'z-s464863-create-dataset', filter: 'datasets/*', selector: lastSuccessful())
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('Create model') {
|
|
|
|
agent {
|
|
|
|
dockerfile {
|
|
|
|
filename 'Dockerfile'
|
|
|
|
reuseNode true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
steps {
|
2024-04-24 20:22:04 +02:00
|
|
|
script {
|
|
|
|
sh "chmod +x ./create_model.py"
|
2024-04-24 22:01:29 +02:00
|
|
|
sh "python3 ./create_model.py with 'num_epochs=${params.epochs}' 'learning_rate=${params.learning_rate}' 'weight_decay=${params.weight_decay}'"
|
2024-04-24 20:22:04 +02:00
|
|
|
|
|
|
|
def experiment_id = readFile('experiment_id.txt').trim()
|
|
|
|
archiveArtifacts artifacts: "my_runs/${experiment_id}/*", onlyIfSuccessful: true
|
|
|
|
|
|
|
|
def sources = readFile('sources.txt').split('\n')
|
|
|
|
|
|
|
|
for (def source in sources) {
|
|
|
|
archiveArtifacts artifacts: "my_runs/${source}", onlyIfSuccessful: true
|
|
|
|
}
|
|
|
|
|
|
|
|
def resources = readFile('resources.txt').split('\n')
|
|
|
|
|
|
|
|
for (def resource in resources) {
|
|
|
|
archiveArtifacts artifacts: "${resource}", onlyIfSuccessful: true
|
|
|
|
}
|
|
|
|
|
|
|
|
build job: 's464863-evaluation/main', wait: false
|
|
|
|
}
|
2024-04-19 10:34:35 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|