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

[WizInt] fixing the problem with teacher test #4253

Merged
merged 1 commit into from Dec 15, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 1 addition & 3 deletions parlai/tasks/wizard_of_internet/agents.py
Expand Up @@ -183,11 +183,9 @@ def add_cmdline_args(cls, parser: ParlaiParser, partial_opt=None) -> ParlaiParse

def _load_data(self, datafile):
logging.info(f'Loading data from {datafile} ...')
dialogs = []
with jsonlines.open(datafile, 'r') as fin:
for dialog_json in tqdm(fin):
dialogs.append(self._get_episode_examples(dialog_json))
return dialogs
yield self._get_episode_examples(dialog_json)

def _get_episode_examples(self, dialog_json):
data = get_single_val_from_dict(dialog_json)
Expand Down