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

Commit

Permalink
Marginally faster display data (#3544)
Browse files Browse the repository at this point in the history
* Faster display_data.

* Update display_data.py

* Update display_data.py
  • Loading branch information
stephenroller authored Mar 31, 2021
1 parent 7da15f7 commit ea1b494
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions parlai/scripts/display_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"""

from parlai.core.params import ParlaiParser
from parlai.agents.repeat_label.repeat_label import RepeatLabelAgent
from parlai.agents.fixed_response.fixed_response import FixedResponseAgent
from parlai.core.worlds import create_task
from parlai.utils.strings import colorize
from parlai.core.script import ParlaiScript, register_script
Expand Down Expand Up @@ -64,9 +64,10 @@ def display_data(opt):
if 'ordered' not in opt['datatype'] and 'train' in opt['datatype']:
opt['datatype'] = f"{opt['datatype']}:ordered"

# create repeat label agent and assign it to the specified task
# create dummy agent and assign it to the specified task
opt.log()
agent = RepeatLabelAgent(opt)
opt['fixed_response'] = None
agent = FixedResponseAgent(opt)
world = create_task(opt, agent)

# Show some example dialogs.
Expand Down

0 comments on commit ea1b494

Please sign in to comment.