9cd4660524f86e8890754c5d252446adaa6d0c45,parlai/core/params.py,ParlaiParser,__init__,#ParlaiParser#Any#Any#,27
Before Change
def __init__(self, add_parlai_args=True, add_model_args=False):
self.parser = argparse.ArgumentParser(description="ParlAI parser.")
self.parser.register("type", "bool", str2bool)
self.parlai_home = (os.path.dirname(os.path.dirname(os.path.dirname(
os.path.realpath(__file__)))))
os.environ["PARLAI_HOME"] = self.parlai_home
self.add_arg = self.parser.add_argument
self.add_argument = self.parser.add_argument
self.register = self.parser.register
if add_parlai_args:
self.add_parlai_args()
if add_model_args:
After Change
def __init__(self, add_parlai_args=True, add_model_args=False):
super().__init__(description="ParlAI parser.")
self.register("type", "bool", str2bool)
self.parlai_home = (os.path.dirname(os.path.dirname(os.path.dirname(
os.path.realpath(__file__)))))
os.environ["PARLAI_HOME"] = self.parlai_home
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: facebookresearch/ParlAI
Commit Name: 9cd4660524f86e8890754c5d252446adaa6d0c45
Time: 2017-06-14
Author: ahm@fb.com
File Name: parlai/core/params.py
Class Name: ParlaiParser
Method Name: __init__
Project Name: MycroftAI/mycroft-precise
Commit Name: 4cec9b076727d32c4f31f838c32567fc51fa1e9d
Time: 2019-10-31
Author: matthew331199@gmail.com
File Name: precise/scripts/train.py
Class Name: Trainer
Method Name: __init__
Project Name: tensorflow/minigo
Commit Name: 8ed08c8ddd6a03ac602fc011002e1471f34738c4
Time: 2018-09-20
Author: brianderson@google.com
File Name: rl_loop.py
Class Name:
Method Name: