b9a661d7335a7a1c098a98c5085e7252b3c45940,parlai/tasks/convai2/worlds.py,InteractiveWorld,parley,#InteractiveWorld#,76

Before Change


            act["id"] = "persona"
            human_agent.observe(validate(act))
        act = deepcopy(human_agent.act())
        if self.cnt == 0:
            // add the persona on to the first message to model agent
            act.force_set("text", self.p2 + act.get("text", "hi"))
            model_agent.observe(validate(act))
        else:
            model_agent.observe(validate(act))
        acts[1] = model_agent.act()
        human_agent.observe(validate(acts[1]))
        self.update_counters()
        self.cnt += 1

After Change


            personas.add("\n".join(a1_persona))
            personas.add("\n".join(a2_persona))
    print("[ loaded " + str(len(personas)) + " personas ]")
    return list(personas)


class InteractiveWorld(InteractiveBaseWorld):
    @staticmethod
    def add_cmdline_args(argparser):
        parser = argparser.add_argument_group("ConvAI2 Interactive World")
        parser.add_argument(
            "--display-partner-persona",
            type="bool",
            default=True,
            help="Display your partner persona at the end of the chat",
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: facebookresearch/ParlAI
Commit Name: b9a661d7335a7a1c098a98c5085e7252b3c45940
Time: 2020-03-25
Author: jase@fb.com
File Name: parlai/tasks/convai2/worlds.py
Class Name: InteractiveWorld
Method Name: parley


Project Name: facebookresearch/ParlAI
Commit Name: 7ebc7bda3484804caec37ce58045ac0822767100
Time: 2020-07-27
Author: dianaglzrico@gmail.com
File Name: parlai/tasks/wrapper/agents.py
Class Name: LabelToTextTeacher
Method Name: act


Project Name: facebookresearch/ParlAI
Commit Name: 1f1822153e2f32a107a21bae414d0b012ea15608
Time: 2020-04-29
Author: roller@fb.com
File Name: parlai/agents/local_human/local_human.py
Class Name: LocalHumanAgent
Method Name: act