add sendMail and parameters
This commit is contained in:
parent
1df69c4ccf
commit
9c135c7665
3
.gitignore
vendored
3
.gitignore
vendored
@ -61,5 +61,6 @@ data.csv
|
||||
test.csv
|
||||
train.csv
|
||||
dev.csv
|
||||
stat.txt
|
||||
*.txt
|
||||
.venv/
|
||||
model.h5
|
@ -7,6 +7,16 @@ pipeline {
|
||||
defaultSelector: lastSuccessful(),
|
||||
description: 'Which build to use for copying artifacts',
|
||||
name: 'WHICH_BUILD'
|
||||
),
|
||||
string(
|
||||
defaultValue: '16'
|
||||
description: 'batch size',
|
||||
name: 'BATCH_SIZE'
|
||||
),
|
||||
string(
|
||||
defaultValue: '15'
|
||||
description: 'epochs',
|
||||
name: 'EPOCHS'
|
||||
)
|
||||
}
|
||||
stages {
|
||||
@ -15,7 +25,13 @@ pipeline {
|
||||
steps
|
||||
{
|
||||
copyArtifacts(fingerprintArtifacts: true, projectName: 's434760-create-dataset', selector: buildParameter('WHICH_BUILD'))
|
||||
sh 'python3.8 train.py'
|
||||
}
|
||||
}
|
||||
stage('train')
|
||||
{
|
||||
steps
|
||||
{
|
||||
sh 'python3.8 train.py ${params.BATCH_SIZE} ${params.EPOCHS}'
|
||||
}
|
||||
}
|
||||
stage('archive artifacts') {
|
||||
@ -23,5 +39,10 @@ pipeline {
|
||||
archiveArtifacts 'model.h5'
|
||||
}
|
||||
}
|
||||
stage('send email') {
|
||||
emailext body: 'build status: ${currentBuild.result}',
|
||||
subject: 's434760 - train',
|
||||
to: 'annnow19@st.amu.edu.pl'
|
||||
}
|
||||
}
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
Train: 25.844615936279297
|
||||
Test: 25.38555335998535
|
6656
results.csv
6656
results.csv
File diff suppressed because it is too large
Load Diff
5
train.py
5
train.py
@ -2,6 +2,7 @@ import pandas as pd
|
||||
from os import path
|
||||
from tensorflow import keras
|
||||
from tensorflow.keras import layers
|
||||
import sys
|
||||
|
||||
model_name = "model.h5"
|
||||
train_data=pd.read_csv('train.csv')
|
||||
@ -30,8 +31,8 @@ else:
|
||||
history = model.fit(
|
||||
X,
|
||||
Y,
|
||||
batch_size=16,
|
||||
epochs=15,
|
||||
batch_size=int(sys.argv[1]),
|
||||
epochs=int(sys.argv[2]),
|
||||
)
|
||||
|
||||
model.save(model_name)
|
||||
|
Loading…
Reference in New Issue
Block a user