Skip to content

Commit

Permalink
fix recursive import error in logger.py; logger illegal warnings in m…
Browse files Browse the repository at this point in the history
…ultiwoz agenda policy
  • Loading branch information
zz-jacob committed Jun 4, 2019
1 parent 15bc951 commit ecadc6e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion convlab/lib/logger.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from convlab.lib import util
import colorlog
import logging
import os
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
from convlab.modules.usr.multiwoz.goal_generator import GoalGenerator
from convlab.modules.policy.user.policy import UserPolicy
from convlab.modules.util.multiwoz_slot_trans import REF_USR_DA, REF_SYS_DA
from convlab.lib import logger

logger = logger.get_logger(__name__)

DEF_VAL_UNK = '?' # Unknown
DEF_VAL_DNC = 'don\'t care' # Do not care
Expand Down Expand Up @@ -206,7 +209,7 @@ def _normalize_value(cls, domain, intent, slot, value):
if check_if_time(value):
return value

print('illegal value: %s, slot: %s domain: %s' % (value, slot, domain))
logger.warning('Value not found in standard value set: [%s] (slot: %s domain: %s)' % (value, slot, domain))
return value

def transform_value(value):
Expand Down

0 comments on commit ecadc6e

Please sign in to comment.