add multipieline project
All checks were successful
s440058-training/pipeline/head This commit looks good
All checks were successful
s440058-training/pipeline/head This commit looks good
This commit is contained in:
parent
bdc4ccdf9b
commit
2b3bfc70e4
@ -28,13 +28,12 @@ pipeline {
|
|||||||
}
|
}
|
||||||
stage('Docker'){
|
stage('Docker'){
|
||||||
steps{
|
steps{
|
||||||
sh 'python3 "./pytorch-example.py" ${BATCH_SIZE} ${EPOCHS} > pred.txt'
|
sh 'python3 "./pytorch-example.py" ${BATCH_SIZE} ${EPOCHS} > model.txt'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('archiveArtifacts') {
|
stage('archiveArtifacts') {
|
||||||
steps{
|
steps{
|
||||||
archiveArtifacts 'ium_s440058/**'
|
archiveArtifacts 'model.txt'
|
||||||
archiveArtifacts 'pred.txt'
|
|
||||||
archiveArtifacts 'diabetes.pkl'
|
archiveArtifacts 'diabetes.pkl'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ import numpy as np
|
|||||||
import torch.nn.functional as F
|
import torch.nn.functional as F
|
||||||
from torch.utils.data import DataLoader, TensorDataset, random_split
|
from torch.utils.data import DataLoader, TensorDataset, random_split
|
||||||
from sklearn import preprocessing
|
from sklearn import preprocessing
|
||||||
|
import sys
|
||||||
|
|
||||||
class LogisticRegressionModel(torch.nn.Module):
|
class LogisticRegressionModel(torch.nn.Module):
|
||||||
def __init__(self, input_dim, output_dim):
|
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)
|
fTest= torch.from_numpy(x_test.values)
|
||||||
tTest = torch.from_numpy(y_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
|
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
|
learning_rate = 0.005
|
||||||
input_dim = 4
|
input_dim = 4
|
||||||
output_dim = 1
|
output_dim = 1
|
||||||
|
Loading…
Reference in New Issue
Block a user