mirror of
https://github.com/modelscope/modelscope.git
synced 2026-09-01 19:49:03 +02:00
update
This commit is contained in:
@@ -202,7 +202,7 @@ class MultiWozDB(object):
|
||||
':'
|
||||
) # raise error if time value is not xx:xx format
|
||||
v = int(h) * 60 + int(m)
|
||||
except:
|
||||
except Exception:
|
||||
match = False
|
||||
break
|
||||
time = int(db_ent[s].split(':')[0]) * 60 + int(
|
||||
@@ -243,7 +243,12 @@ class MultiWozDB(object):
|
||||
|
||||
flag = True
|
||||
for key, val in constraints.items():
|
||||
if val == '' or val == 'dontcare' or val == 'not mentioned' or val == "don't care" or val == 'dont care' or val == "do n't care":
|
||||
if val == '' \
|
||||
or val == 'dontcare' \
|
||||
or val == 'not mentioned' \
|
||||
or val == "don't care" \
|
||||
or val == 'dont care' \
|
||||
or val == "do n't care":
|
||||
pass
|
||||
else:
|
||||
if flag:
|
||||
@@ -270,7 +275,7 @@ class MultiWozDB(object):
|
||||
try: # "select * from attraction where name = 'queens college'"
|
||||
print(sql_query)
|
||||
return self.sql_dbs[domain].execute(sql_query).fetchall()
|
||||
except:
|
||||
except Exception:
|
||||
return [] # TODO test it
|
||||
|
||||
|
||||
|
||||
@@ -2,11 +2,10 @@
|
||||
|
||||
import unittest
|
||||
|
||||
from tests.case.nlp.dialog_generation_case import test_case
|
||||
|
||||
from maas_lib.preprocessors import DialogGenerationPreprocessor
|
||||
from maas_lib.utils.constant import Fields, InputFields
|
||||
from maas_lib.utils.logger import get_logger
|
||||
from tests.case.nlp.dialog_generation_case import test_case
|
||||
|
||||
logger = get_logger()
|
||||
|
||||
|
||||
@@ -2,11 +2,10 @@
|
||||
|
||||
import unittest
|
||||
|
||||
from tests.case.nlp.dialog_intent_case import test_case
|
||||
|
||||
from maas_lib.preprocessors import DialogIntentPreprocessor
|
||||
from maas_lib.utils.constant import Fields, InputFields
|
||||
from maas_lib.utils.logger import get_logger
|
||||
from tests.case.nlp.dialog_intent_case import test_case
|
||||
|
||||
logger = get_logger()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user