parametrization of number of epochs
s444354-training/pipeline/head There was a failure building this commit Details

This commit is contained in:
Adrian Charkiewicz 2022-05-07 12:19:39 +02:00
parent 098f5cabfb
commit 3033b4db86
2 changed files with 9 additions and 5 deletions

View File

@ -2,15 +2,19 @@ pipeline {
agent { agent {
dockerfile true dockerfile true
} }
parameters{
string(
defaultValue: '1500',
description: 'Epoch number',
name: 'EPOCH_NUMBER'
)
}
stages { stages {
stage('Copy') { stage('Copy') {
steps { steps {
copyArtifacts projectName: 's444354-create-dataset' copyArtifacts projectName: 's444354-create-dataset'
sh 'python3 ./pytorch/pytorch.py' sh 'python3 ./pytorch/pytorch.py $EPOCH_NUMBER'
} }
} }
stage('Archive') { stage('Archive') {

View File

@ -149,7 +149,7 @@ def fit(epochs, lr, model, train_loader, val_loader, opt_func=torch.optim.SGD):
# In[12]: # In[12]:
epochs = 1500 epochs = sys.argv[1]
lr = 1e-6 lr = 1e-6
history5 = fit(epochs, lr, model, train_loader, val_loader) history5 = fit(epochs, lr, model, train_loader, val_loader)