Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

fix wikimovies kb teacher #207

Merged
merged 1 commit into from
Jul 12, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion parlai/tasks/wikimovies/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ def _path(opt):
class KBTeacher(FbDialogTeacher):
def __init__(self, opt, shared=None):
build(opt)
task = opt.get('task', 'wikimovies:KB:kb')
task = opt.get('task')
if not task:
task = 'wikimovies:KB:kb'
kb = task.split(':')
if len(kb) == 3:
kb = kb[2]
Expand Down