From b06ef77b3ff7ad510238f41e527d34638d1d35ca Mon Sep 17 00:00:00 2001 From: Andrew Tan Date: Wed, 29 Nov 2023 16:14:23 +0800 Subject: [PATCH] Fix bug where explanation is not initialized --- chatarena/environments/umshini/symmetric_content_moderation.py | 1 + 1 file changed, 1 insertion(+) diff --git a/chatarena/environments/umshini/symmetric_content_moderation.py b/chatarena/environments/umshini/symmetric_content_moderation.py index 1b53187c..1eb8c0f2 100644 --- a/chatarena/environments/umshini/symmetric_content_moderation.py +++ b/chatarena/environments/umshini/symmetric_content_moderation.py @@ -71,6 +71,7 @@ def get_rewards(self) -> tuple[dict[str, float], str, str]: return scores, "", "" violation = False + explanation = None if self.disable_judging: violation = True if random.randint(0, 1) else False else: