ium_464863/models/Jenkinsfile

57 lines
1.4 KiB
Groovy

pipeline {
agent any
parameters {
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'
)
}
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 {
sh "chmod +x ./create_model.py"
sh "python3 ./create_model.py"
archiveArtifacts artifacts: 'models/model.pth', onlyIfSuccessful: true
}
}
}
}