From e61c1c0ca2c5618031e7b55f6d357281db5e814d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=B6pf?= Date: Mon, 30 Jan 2023 00:26:09 +0100 Subject: [PATCH] fix valid_labels/mandatory labels mixup --- backend/oasst_backend/tree_manager.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/oasst_backend/tree_manager.py b/backend/oasst_backend/tree_manager.py index b8466ff0..e917a57c 100644 --- a/backend/oasst_backend/tree_manager.py +++ b/backend/oasst_backend/tree_manager.py @@ -375,7 +375,7 @@ class TreeManager: ): label_mode = protocol_schema.LabelTaskMode.simple label_disposition = protocol_schema.LabelTaskDisposition.spam - valid_labels = list(self.cfg.mandatory_labels_assistant_reply) + valid_labels = self.cfg.mandatory_labels_assistant_reply.copy() if protocol_schema.TextLabel.lang_mismatch not in valid_labels: valid_labels.append(protocol_schema.TextLabel.lang_mismatch) if protocol_schema.TextLabel.quality not in valid_labels: @@ -401,7 +401,7 @@ class TreeManager: ): label_mode = protocol_schema.LabelTaskMode.simple label_disposition = protocol_schema.LabelTaskDisposition.spam - valid_labels = list(self.cfg.mandatory_labels_prompter_reply) + valid_labels = self.cfg.mandatory_labels_prompter_reply.copy() if protocol_schema.TextLabel.lang_mismatch not in valid_labels: valid_labels.append(protocol_schema.TextLabel.lang_mismatch) if protocol_schema.TextLabel.quality not in valid_labels: @@ -484,7 +484,7 @@ class TreeManager: valid_labels = self.cfg.labels_initial_prompt if random.random() > self.cfg.p_full_labeling_review_prompt: - valid_labels = self.cfg.mandatory_labels_initial_prompt + valid_labels = self.cfg.mandatory_labels_initial_prompt.copy() label_mode = protocol_schema.LabelTaskMode.simple label_disposition = protocol_schema.LabelTaskDisposition.spam if protocol_schema.TextLabel.lang_mismatch not in valid_labels: