From 29758144e2ac31eb12bb9810aff6c2d6fcdeeb0b Mon Sep 17 00:00:00 2001 From: rajdeep11 Date: Fri, 20 Dec 2024 17:40:22 +0530 Subject: [PATCH] changes to enable the retraining multiple times the error was that if the model is retrained the pipeline saves the model in retrain folder Change-Id: I16cbb6e93d30b88f75a307219d24d79b03bf7cfd Signed-off-by: rajdeep11 --- kf-pipelines/qoe-pipeline-retrain-2.ipynb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kf-pipelines/qoe-pipeline-retrain-2.ipynb b/kf-pipelines/qoe-pipeline-retrain-2.ipynb index 5bfcf92..f933c35 100644 --- a/kf-pipelines/qoe-pipeline-retrain-2.ipynb +++ b/kf-pipelines/qoe-pipeline-retrain-2.ipynb @@ -130,7 +130,12 @@ " print(f'Zip file not found: {zip_file_path}')\n", "\n", " # Load the model in SavedModel format\n", - " model_path = \"./Model/1\" # Path to the directory containing the saved model\n", + " # Path to the directory containing the saved model\n", + " if artifactversion ==\"1.0.0\":\n", + " model_path = \"./Model/1\"\n", + " else:\n", + " model_path= \"./Model/1/retrain\"\n", + " \n", " model = tf.keras.models.load_model(model_path)\n", " model.compile(loss='mse', optimizer='adam', metrics=['mse'])\n", " model.summary()\n", -- 2.16.6