From 85b20518a44a50a26efe9d65e17ee49dc8b667dd Mon Sep 17 00:00:00 2001 From: Wojciech Jarmosz Date: Sat, 15 May 2021 03:00:10 +0200 Subject: [PATCH] Change training model params --- Jenkinsfile_train | 5 +++-- training.py | 5 ++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile_train b/Jenkinsfile_train index d1356be..7e37c67 100644 --- a/Jenkinsfile_train +++ b/Jenkinsfile_train @@ -4,7 +4,8 @@ pipeline { } parameters { gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'BRANCH', type: 'PT_BRANCH' - string(name: 'options', description: 'Trainig script options') + string(name: 'epochs', description: 'Model epochs') + string(name: 'verbose', description: 'Model verbose') buildSelector(defaultSelector: lastSuccessful(), description: 'Use latest build', name: 'BUILD_SELECTOR') } stages { @@ -15,7 +16,7 @@ pipeline { } stage("Run training"){ steps { - sh "python3 training.py ${params.options}" + sh "python3 training.py ${params.verbose}" ${params.epochs}" } } stage('Save trained model files') { diff --git a/training.py b/training.py index 8a0f3ab..58f7655 100644 --- a/training.py +++ b/training.py @@ -11,9 +11,8 @@ from tensorflow.keras.layers.experimental import preprocessing arguments = sys.argv[1:] -verbose = [command.split('=')[1] for command in arguments if command.split('=')[0] == 'verbose'] -epochs = [command.split('=')[1] for command in arguments if command.split('=')[0] == 'epochs'] - +verbose = arguments[0] +epochs = arguments[1] pd.set_option("display.max_columns", None)