From fe97b32dce84355dde47f4290375ce58ab63526a Mon Sep 17 00:00:00 2001 From: hjk1030 Date: Mon, 15 Apr 2024 13:19:17 +0000 Subject: [PATCH 1/4] Fix: nan is not json compliant --- launch.py | 1 + 1 file changed, 1 insertion(+) diff --git a/launch.py b/launch.py index d2bceb93..ffb44d71 100644 --- a/launch.py +++ b/launch.py @@ -12,6 +12,7 @@ def setup_blob_tables(config): input_blobs = pd.read_csv(config.blobs_csv_file) + input_blobs = input_blobs.fillna("") base_table_setup = BaseTablesSetup(f"{config.DB_URL}/{config.DB_NAME}") base_table_setup.insert_blob_meta_data(config.blob_table_name, input_blobs, config.blobs_keys_columns) From 28f5e677365f3a4be23823366e8ff625a3e9f71c Mon Sep 17 00:00:00 2001 From: hjk1030 Date: Thu, 25 Apr 2024 09:18:43 +0000 Subject: [PATCH 2/4] Removing dropna and previous changes --- launch.py | 1 - tests/inference_service_utils/http_inference_service_setup.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/launch.py b/launch.py index ffb44d71..d2bceb93 100644 --- a/launch.py +++ b/launch.py @@ -12,7 +12,6 @@ def setup_blob_tables(config): input_blobs = pd.read_csv(config.blobs_csv_file) - input_blobs = input_blobs.fillna("") base_table_setup = BaseTablesSetup(f"{config.DB_URL}/{config.DB_NAME}") base_table_setup.insert_blob_meta_data(config.blob_table_name, input_blobs, config.blobs_keys_columns) diff --git a/tests/inference_service_utils/http_inference_service_setup.py b/tests/inference_service_utils/http_inference_service_setup.py index df3e7a38..7027915b 100644 --- a/tests/inference_service_utils/http_inference_service_setup.py +++ b/tests/inference_service_utils/http_inference_service_setup.py @@ -63,7 +63,7 @@ async def inference(inp: Request): grouped = result_df.groupby(name_to_input_cols[service_name]) res_df_list = [] for _, group in grouped: - group = group.drop(columns=name_to_input_cols[service_name]).dropna() + # group = group.drop(columns=name_to_input_cols[service_name]).dropna() res_df_list.append(group.to_dict(orient='list')) return res_df_list From df86090cb7cfe2bfcb36c98f08277a3c686bceb7 Mon Sep 17 00:00:00 2001 From: hjk1030 Date: Thu, 25 Apr 2024 20:52:02 +0800 Subject: [PATCH 3/4] Adding back the errorly removed drop function --- tests/inference_service_utils/http_inference_service_setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/inference_service_utils/http_inference_service_setup.py b/tests/inference_service_utils/http_inference_service_setup.py index 7027915b..c95b9217 100644 --- a/tests/inference_service_utils/http_inference_service_setup.py +++ b/tests/inference_service_utils/http_inference_service_setup.py @@ -63,7 +63,7 @@ async def inference(inp: Request): grouped = result_df.groupby(name_to_input_cols[service_name]) res_df_list = [] for _, group in grouped: - # group = group.drop(columns=name_to_input_cols[service_name]).dropna() + group = group.drop(columns=name_to_input_cols[service_name]) res_df_list.append(group.to_dict(orient='list')) return res_df_list From bce76bf89ed24bd9aef64c49724a48dc1f25971f Mon Sep 17 00:00:00 2001 From: hjk1030 Date: Thu, 25 Apr 2024 23:25:40 +0800 Subject: [PATCH 4/4] Drop the all null lines corresponds to no output --- tests/inference_service_utils/http_inference_service_setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/inference_service_utils/http_inference_service_setup.py b/tests/inference_service_utils/http_inference_service_setup.py index c95b9217..3263d4d4 100644 --- a/tests/inference_service_utils/http_inference_service_setup.py +++ b/tests/inference_service_utils/http_inference_service_setup.py @@ -63,7 +63,7 @@ async def inference(inp: Request): grouped = result_df.groupby(name_to_input_cols[service_name]) res_df_list = [] for _, group in grouped: - group = group.drop(columns=name_to_input_cols[service_name]) + group = group.drop(columns=name_to_input_cols[service_name]).dropna(how='all') res_df_list.append(group.to_dict(orient='list')) return res_df_list