未验证 提交 0ae32c6e 编写于 作者: Y Yibing Liu 提交者: GitHub

Fix the bug in knowledge desc merging (#159)

上级 df301456
...@@ -298,8 +298,9 @@ class Student(object): ...@@ -298,8 +298,9 @@ class Student(object):
for idx, queue in enumerate(self._teacher_knowledge_queues): for idx, queue in enumerate(self._teacher_knowledge_queues):
desc = queue.get() desc = queue.get()
queue.task_done() queue.task_done()
if idx > 0 and (set(knowledge_desc.keys()) & set(desc.keys()) inter_desc = set(knowledge_desc.keys()) & set(desc.keys())
!= set(self._common_schema)): if idx > 0 and (
not inter_desc.issubset(set(self._common_schema))):
raise ValueError( raise ValueError(
"Teacher {} has the same schema with other existed " "Teacher {} has the same schema with other existed "
"teachers not in the merge_strategy.".format(idx)) "teachers not in the merge_strategy.".format(idx))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册