add multipieline project
All checks were successful
s440058-training/pipeline/head This commit looks good

This commit is contained in:
piotr6789 2021-05-24 12:21:39 +02:00
parent bdc4ccdf9b
commit 2b3bfc70e4
2 changed files with 5 additions and 5 deletions

View File

@ -28,13 +28,12 @@ pipeline {
}
stage('Docker'){
steps{
sh 'python3 "./pytorch-example.py" ${BATCH_SIZE} ${EPOCHS} > pred.txt'
sh 'python3 "./pytorch-example.py" ${BATCH_SIZE} ${EPOCHS} > model.txt'
}
}
stage('archiveArtifacts') {
steps{
archiveArtifacts 'ium_s440058/**'
archiveArtifacts 'pred.txt'
archiveArtifacts 'model.txt'
archiveArtifacts 'diabetes.pkl'
}
}

View File

@ -6,6 +6,7 @@ import numpy as np
import torch.nn.functional as F
from torch.utils.data import DataLoader, TensorDataset, random_split
from sklearn import preprocessing
import sys
class LogisticRegressionModel(torch.nn.Module):
def __init__(self, input_dim, output_dim):
@ -35,9 +36,9 @@ tTrain = torch.from_numpy(y_train.values.reshape(460,1))
fTest= torch.from_numpy(x_test.values)
tTest = torch.from_numpy(y_test.values)
batch_size = 95
batch_size = int(sys.argv[1]) if len(sys.argv) > 1 else 20
n_iters = 900
num_epochs = int(n_iters / (len(x_train) / batch_size))
num_epochs = int(sys.argv[2]) if len(sys.argv) > 2 else 10
learning_rate = 0.005
input_dim = 4
output_dim = 1