From 26cc32571645f7a681024ea2c8d2141c3a76c8f8 Mon Sep 17 00:00:00 2001 From: Lianmin Zheng Date: Thu, 14 Sep 2023 11:47:20 +0000 Subject: [PATCH] fix format --- .../lmsys_chat_1m/final_post_processing.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fastchat/serve/monitor/dataset_release_scripts/lmsys_chat_1m/final_post_processing.py b/fastchat/serve/monitor/dataset_release_scripts/lmsys_chat_1m/final_post_processing.py index 8d47f6bf0..3dd0c5f75 100644 --- a/fastchat/serve/monitor/dataset_release_scripts/lmsys_chat_1m/final_post_processing.py +++ b/fastchat/serve/monitor/dataset_release_scripts/lmsys_chat_1m/final_post_processing.py @@ -15,11 +15,17 @@ convs = json.load(open(args.in_file)) print(f"#conv: {len(convs)}") + new_convs = [] for c in convs: del c["tstamp"] del c["user_id"] + if len(c["conversation"]) == 0: + continue - np.random.seed(44) + new_convs.append(c) + convs = new_convs + + np.random.seed(42) np.random.shuffle(convs) convs = convs[:args.number]