From e1a44b1a65df2b74c29df2a236f6c2a383af2f2d Mon Sep 17 00:00:00 2001
From: Hsien-Chin Lin <linh@hhu.de>
Date: Fri, 14 Apr 2023 14:24:04 +0200
Subject: [PATCH] remove some debug message

---
 convlab/policy/emoUS/emotion_eval.py           | 1 +
 convlab/policy/emoUS/evaluate.py               | 3 ++-
 convlab/policy/genTUS/ppo/vector.py            | 4 ++--
 convlab/policy/genTUS/stepGenTUS.py            | 2 +-
 convlab/policy/genTUS/unify/knowledge_graph.py | 2 +-
 5 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/convlab/policy/emoUS/emotion_eval.py b/convlab/policy/emoUS/emotion_eval.py
index ee9fc616..511db5d9 100644
--- a/convlab/policy/emoUS/emotion_eval.py
+++ b/convlab/policy/emoUS/emotion_eval.py
@@ -326,6 +326,7 @@ def main():
                      emotion_mid=args.emotion_mid,
                      weight=args.weight,
                      sample=args.sample)
+    print("=== evaluation ===")
     print("model checkpoint", args.model_checkpoint)
     print("generated_file", args.generated_file)
     print("input_file", args.input_file)
diff --git a/convlab/policy/emoUS/evaluate.py b/convlab/policy/emoUS/evaluate.py
index df3f64de..462c1dc8 100644
--- a/convlab/policy/emoUS/evaluate.py
+++ b/convlab/policy/emoUS/evaluate.py
@@ -98,7 +98,7 @@ class Evaluator:
         if self.sample:
             mode = "sample"
 
-        for dialog in tqdm(in_file['dialog']):
+        for dialog in tqdm(in_file['dialog'][:1]):
             inputs = dialog["in"]
             labels = self.usr._parse_output(dialog["out"])
 
@@ -341,6 +341,7 @@ def main():
                      emotion_mid=args.emotion_mid,
                      weight=args.weight,
                      sample=args.sample)
+    print("=== evaluation ===")
     print("model checkpoint", args.model_checkpoint)
     print("generated_file", args.generated_file)
     print("input_file", args.input_file)
diff --git a/convlab/policy/genTUS/ppo/vector.py b/convlab/policy/genTUS/ppo/vector.py
index 4c502a46..ca1a7415 100644
--- a/convlab/policy/genTUS/ppo/vector.py
+++ b/convlab/policy/genTUS/ppo/vector.py
@@ -19,8 +19,8 @@ class stepGenTUSVector:
         self.mentioned_domain = []
         self.allow_general_intent = allow_general_intent
         self.candidate_num = 5
-        if self.allow_general_intent:
-            print("---> allow_general_intent")
+        # if self.allow_general_intent:
+        #     print("---> allow_general_intent")
 
     def init_session(self, goal: Goal):
         self.goal = goal
diff --git a/convlab/policy/genTUS/stepGenTUS.py b/convlab/policy/genTUS/stepGenTUS.py
index 4ffe3571..aa18e46a 100644
--- a/convlab/policy/genTUS/stepGenTUS.py
+++ b/convlab/policy/genTUS/stepGenTUS.py
@@ -32,7 +32,7 @@ class UserActionPolicy(Policy):
         self.max_in_len = 500
         self.max_out_len = 100 if only_action else 200
         max_act_len = kwargs.get("max_act_len", 2)
-        print("max_act_len", max_act_len)
+        # print("max_act_len", max_act_len)
         self.max_action_len = max_act_len
         if "max_act_len" in kwargs:
             self.max_out_len = 30 * self.max_action_len
diff --git a/convlab/policy/genTUS/unify/knowledge_graph.py b/convlab/policy/genTUS/unify/knowledge_graph.py
index 81b30442..12dd72ae 100644
--- a/convlab/policy/genTUS/unify/knowledge_graph.py
+++ b/convlab/policy/genTUS/unify/knowledge_graph.py
@@ -11,7 +11,7 @@ DATASET = "unify"
 
 class KnowledgeGraph:
     def __init__(self, tokenizer: BartTokenizer, ontology_file=None, dataset="multiwoz21"):
-        print("dataset", dataset)
+        # print("dataset", dataset)
         self.debug = DEBUG
         self.tokenizer = tokenizer
 
-- 
GitLab