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

Commit

Permalink
Self-chat mutator fix (#3480)
Browse files Browse the repository at this point in the history
* Self-chat mutator fix

* Lint
  • Loading branch information
EricMichaelSmith authored Mar 1, 2021
1 parent d4877c3 commit 77ed3d0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions parlai/tasks/self_chat/worlds.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

from parlai.agents.fixed_response.fixed_response import FixedResponseAgent
from parlai.core.agents import Agent
from parlai.core.opt import Opt
from parlai.core.params import ParlaiParser
from parlai.core.worlds import create_task, DialogPartnerWorld, validate
from parlai.core.message import Message

Expand Down Expand Up @@ -51,6 +53,17 @@ def load_openers(opt) -> Optional[List[str]]:


class SelfChatWorld(DialogPartnerWorld):
@classmethod
def add_cmdline_args(
cls, parser: ParlaiParser, partial_opt: Optional[Opt] = None
) -> ParlaiParser:
"""
Return the parser as-is.
Self-chat-specific world flags can be added here.
"""
return parser

def __init__(self, opt, agents, shared=None):
super().__init__(opt, agents, shared)
self.init_contexts(shared=shared)
Expand Down

0 comments on commit 77ed3d0

Please sign in to comment.