Arguments
Some checks failed
s434784-training/pipeline/head There was a failure building this commit
Some checks failed
s434784-training/pipeline/head There was a failure building this commit
This commit is contained in:
parent
def7cd8975
commit
eb520d69b7
@ -1,13 +1,38 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent any;
|
agent any;
|
||||||
|
parameters{
|
||||||
|
buildSelector(
|
||||||
|
defaultSelector: lastSuccessful(),
|
||||||
|
description: 'Which build to use for copying artifacts',
|
||||||
|
name: 'BUILD_SELECTOR'
|
||||||
|
)
|
||||||
|
string(
|
||||||
|
defaultValue: '10',
|
||||||
|
description: 'batch size',
|
||||||
|
name: 'BATCH_SIZE'
|
||||||
|
)
|
||||||
|
string(
|
||||||
|
defaultValue: '5',
|
||||||
|
description: 'epochs',
|
||||||
|
name: 'EPOCHS'
|
||||||
|
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
stages{
|
stages{
|
||||||
|
stage('artifacts') {
|
||||||
|
steps {
|
||||||
|
copyArtifacts fingerprintArtifacts: true, projectName: 's434784-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
stage('docker-training') {
|
stage('docker-training') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
def image = docker.build('dock')
|
def image = docker.build('dock')
|
||||||
image.inside{
|
image.inside{
|
||||||
sh 'chmod +x training.py'
|
sh 'chmod +x training.py'
|
||||||
sh 'python3 training.py'
|
sh 'python3 training.py ${EPOCHS} ${BATCH_SIZE}'
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,8 @@ model.compile(
|
|||||||
# Train model
|
# Train model
|
||||||
history = model.fit(
|
history = model.fit(
|
||||||
X_train, y_train,
|
X_train, y_train,
|
||||||
epochs=30,
|
batch_size=sys.argv[0],
|
||||||
|
epochs=sys.argv[1],
|
||||||
validation_split=0.2)
|
validation_split=0.2)
|
||||||
|
|
||||||
test_results = {}
|
test_results = {}
|
||||||
|
Loading…
Reference in New Issue
Block a user