From 3d2efac4771be5e244acce61ce8189c5a8b1e01a Mon Sep 17 00:00:00 2001 From: Maciej Czajka Date: Wed, 11 May 2022 20:36:54 +0200 Subject: [PATCH] update jenkinsfile_train-sacred, predict.py --- Jenkinsfile_train-sacred | 1 + predict.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile_train-sacred b/Jenkinsfile_train-sacred index 4bed085..54a2bcb 100644 --- a/Jenkinsfile_train-sacred +++ b/Jenkinsfile_train-sacred @@ -17,6 +17,7 @@ pipeline { stage('Script'){ steps { copyArtifacts filter: '*', projectName: 's444356-create-dataset' + sh 'rm -rf my_model' sh "python Biblioteka_DL/dllib-mlflow.py $EPOCHS" archiveArtifacts artifacts: 'games_model.pkl' archiveArtifacts artifacts: 'mlruns/**' diff --git a/predict.py b/predict.py index 4c26ba9..a64f8b8 100644 --- a/predict.py +++ b/predict.py @@ -13,4 +13,4 @@ with open(f'{logged_model}/'+input) as f: data = json.load(f) input_example = np.array([data['inputs'][0]], dtype=np.float32) -loaded_model.predict(input_example) \ No newline at end of file +print(f'Prediction: {loaded_model.predict(input_example)}') \ No newline at end of file