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

Fix the bug in knowledge desc merging (#159) (#160)

上级 493779a9
......@@ -298,8 +298,9 @@ class Student(object):
for idx, queue in enumerate(self._teacher_knowledge_queues):
desc = queue.get()
queue.task_done()
if idx > 0 and (set(knowledge_desc.keys()) & set(desc.keys())
!= set(self._common_schema)):
inter_desc = set(knowledge_desc.keys()) & set(desc.keys())
if idx > 0 and (
not inter_desc.issubset(set(self._common_schema))):
raise ValueError(
"Teacher {} has the same schema with other existed "
"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.
先完成此消息的编辑!
想要评论请 注册