From 3daecf4f3e1d3eab95f2556cd00d051a1f7396f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szymon=20Parafin=CC=81ski?= Date: Thu, 12 May 2022 00:07:35 +0200 Subject: [PATCH] pass epoch to my_main --- Jenkinsfile_train | 2 +- biblioteka_DL/dllib.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile_train b/Jenkinsfile_train index 45a9cb9..336bb24 100644 --- a/Jenkinsfile_train +++ b/Jenkinsfile_train @@ -20,7 +20,7 @@ pipeline { } stage('Train model with sacred') { steps { - sh 'python3 ./biblioteka_DL/dllib.py $EPOCHS' + sh 'python3 ./biblioteka_DL/dllib.py with "epochs=$EPOCHS"'' archiveArtifacts artifacts: 'model.pkl, s444018_sacred_FileObserver/**/*.*, result.csv', followSymlinks: false } } diff --git a/biblioteka_DL/dllib.py b/biblioteka_DL/dllib.py index e65f95b..48964cf 100644 --- a/biblioteka_DL/dllib.py +++ b/biblioteka_DL/dllib.py @@ -168,6 +168,7 @@ def my_main(epochs, _run): _run.log_scalar("RMSE", rmse) _run.log_scalar("MSE", mse) + _run.info['epochs'] = epochs # ex.run() ex.add_artifact("model.pkl")