From 20bb01b8f9c865d2db5791427d457329b4a1aba9 Mon Sep 17 00:00:00 2001 From: jakubknczny Date: Sat, 15 May 2021 22:45:51 +0200 Subject: [PATCH] remove lr, add jenkins eval params --- lab5/eval/Jenkinsfile | 16 +++++++++++++--- lab5/eval/eval.py | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/lab5/eval/Jenkinsfile b/lab5/eval/Jenkinsfile index dedb04c..3c98e2d 100644 --- a/lab5/eval/Jenkinsfile +++ b/lab5/eval/Jenkinsfile @@ -4,7 +4,9 @@ pipeline { buildSelector( defaultSelector: lastSuccessful(), description: 'Which build to use for copying artifacts', - name: 'BUILD_SELECTOR') + name: 'BUILD_SELECTOR' + ) + gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'BRANCH', type: 'PT_BRANCH' } stages { stage('copy files') { @@ -23,8 +25,16 @@ pipeline { stages { stage('copyArtifacts') { steps { - copyArtifacts fingerprintArtifacts: true, projectName: 's470607-create-dataset', selector: buildParameter('BUILD_SELECTOR') - copyArtifacts fingerprintArtifacts: true, projectName: 's470607-training/master', selector: buildParameter('BUILD_SELECTOR') + copyArtifacts fingerprintArtifacts: true, + projectName: 's470607-create-dataset', + selector: buildParameter('BUILD_SELECTOR') + copyArtifacts fingerprintArtifacts: true, + projectName: 's470607-training/${params.BRANCH}', + selector: buildParameter('BUILD_SELECTOR') + copyArtifacts fingerprintArtifacts: true, + optional: true, + projectName: 's470607-evaluation/${params.BRANCH}', + selector: buildParameter('BUILD_SELECTOR') } } stage('ls') { diff --git a/lab5/eval/eval.py b/lab5/eval/eval.py index b11782c..4f3774f 100644 --- a/lab5/eval/eval.py +++ b/lab5/eval/eval.py @@ -35,7 +35,7 @@ model = tensorflow.keras.Sequential([ model.compile( loss=tensorflow.keras.losses.BinaryCrossentropy(), - optimizer=tensorflow.keras.optimizers.Adam(lr=float(sys.argv[1])), + optimizer=tensorflow.keras.optimizers.Adam(), metrics=[tensorflow.keras.metrics.BinaryAccuracy()]) history = model.fit(X_train, Y_train, epochs=2, validation_data=(X_valid, Y_valid))