def setup_args(parser=None): if parser is None: # parser = ParlaiParser(True, True, 'Interactive chat with a model') parser = ParlaiParser(add_model_args=True) parser.set_params( model='legacy:seq2seq:0', model_file='models:convai2/seq2seq/convai2_self_seq2seq_model', dict_file='models:convai2/seq2seq/convai2_self_seq2seq_model.dict', dict_lower=True, ) parser.add_argument('-d', '--display-examples', type='bool', default=False) parser.add_argument( '--display-prettify', type='bool', default=False, help='Set to use a prettytable when displaying ' 'examples with text candidates', ) parser.add_argument( '--display-ignore-fields', type=str, default='label_candidates,text_candidates', help='Do not display these fields', ) parser.add_argument( '-it', '--interactive-task', type='bool', default=True, help='Create interactive version of task', ) parser.add_argument( '-sc', '--script-chateval', type='bool', default=False, dest='chat_script', help='Chateval script read file' 'True: chateval evaluation, False: single-turn conversation with agent(original model)', ) parser.add_argument( '-scip', '--chateval-input-path', type=str, default=None, dest='script_input_path', help='Chateval script input path', ) parser.add_argument( '-scop', '--chateval-output-path', type=str, default=None, dest='script_output_path', help='Chateval result output path', ) parser.set_defaults(interactive_mode=True, task='interactive') LocalHumanAgent.add_cmdline_args(parser) return parser
def setup_args(parser=None): if parser is None: parser = ParlaiParser(True, True, 'Interactive chat with a model') parser.add_argument('-d', '--display-examples', type='bool', default=False) parser.add_argument( '--display-prettify', type='bool', default=False, help='Set to use a prettytable when displaying ' 'examples with text candidates', ) parser.add_argument( '--display-ignore-fields', type=str, default='label_candidates,text_candidates', help='Do not display these fields', ) parser.add_argument( '-it', '--interactive-task', type='bool', default=True, help='Create interactive version of task', ) parser.set_defaults(interactive_mode=True, task='interactive') LocalHumanAgent.add_cmdline_args(parser) return parser
def setup_args(parser=None): if parser is None: parser = ParlaiParser(True, True, 'Interactive chat with a model') parser.add_argument('-d', '--display-examples', type='bool', default=False) parser.add_argument( '--display-prettify', type='bool', default=False, help='Set to use a prettytable when displaying ' 'examples with text candidates', ) parser.add_argument( '--display-ignore-fields', type=str, default='label_candidates,text_candidates', help='Do not display these fields', ) parser.add_argument( '-it', '--interactive-task', type='bool', default=True, help='Create interactive version of task', ) parser.add_argument( '--save-world-logs', type='bool', default=False, help='Saves a jsonl file containing all of the task examples and ' 'model replies. Must also specify --report-filename.', ) parser.set_defaults(interactive_mode=True, task='interactive') LocalHumanAgent.add_cmdline_args(parser) return parser
def setup_args(parser=None): if parser is None: parser = ParlaiParser(True, True, 'Interactive chat with a model') parser.add_argument('-d', '--display-examples', type='bool', default=False) parser.add_argument( '--display-prettify', type='bool', default=False, help='Set to use a prettytable when displaying ' 'examples with text candidates', ) parser.add_argument( '--display-ignore-fields', type=str, default='label_candidates,text_candidates', help='Do not display these fields', ) parser.add_argument( '-sc', '--script-chateval', type='bool', default=False, dest='chat_script', help='Chateval script read file' 'True: chateval evaluation, False: single-turn conversation with agent(original model)', ) parser.add_argument( '-scip', '--chateval-input-path', type=str, default=None, dest='script_input_path', help='Chateval script input path', ) parser.add_argument( '-scop', '--chateval-output-path', type=str, default=None, dest='script_output_path', help='Chateval result output path', ) parser.add_argument( '--chateval-multi-num', type=int, default=0, dest='chateval_multi_num', help='True is chateval multiturn setting, turn coverage count.', ) parser.add_argument( '--chateval-multi', type='bool', default=False, hidden=True, dest='chateval_multi', help='True is chateval multiturn setting, False just single turn.', ) parser.set_defaults(model_file='models:convai2/kvmemnn/model') LocalHumanAgent.add_cmdline_args(parser) return parser
def setup_args(parser=None): if parser is None: parser = ParlaiParser(True, True, 'Interactive chat with a model') parser.set_defaults(interactive_mode=True, task='interactive') LocalHumanAgent.add_cmdline_args(parser, partial_opt=None) SelfFeedingAgent.add_cmdline_args(parser, partial_opt=None) parser.set_defaults(history_size=2) return parser
def setup_args(parser=None): if parser is None: parser = ParlaiParser( True, True, 'Interactive chat with a model on the command line' ) parser.add_argument('-d', '--display-examples', type='bool', default=False) parser.set_defaults(interactive_mode=True, task='interactive') LocalHumanAgent.add_cmdline_args(parser) #WorldLogger.add_cmdline_args(parser) return parser
def setup_args(parser=None): if parser is None: parser = ParlaiParser(True, True) parser.add_argument('-d', '--display-examples', type='bool', default=False) parser.add_argument('--display-prettify', type='bool', default=False, help='Set to use a prettytable when displaying ' 'examples with text candidates') parser.add_argument('--display-ignore-fields', type=str, default='label_candidates,text_candidates', help='Do not display these fields') LocalHumanAgent.add_cmdline_args(parser) return parser
def setup_args(parser=None): if parser is None: parser = ParlaiParser(True, True, 'Interactive chat with a model') parser.add_argument('-d', '--display-examples', type='bool', default=False) parser.add_argument( '--display-prettify', type='bool', default=False, help='Set to use a prettytable when displaying ' 'examples with text candidates', ) parser.add_argument( '--display-ignore-fields', type=str, default='label_candidates,text_candidates', help='Do not display these fields', ) parser.add_argument( '-it', '--interactive-task', type='bool', default=True, help='Create interactive version of task', ) parser.add_argument( '-rf', '--report-filename', type=str, default='', help='Saves a json file of the evaluation report either as an ' 'extension to the model-file (if begins with a ".") or a whole ' 'file path. Set to the empty string to not save at all.', ) parser.add_argument( '--save-world-logs', type='bool', default=False, help='Saves a jsonl file containing all of the task examples and ' 'model replies. Must also specify --report-filename.', ) parser.add_argument('--world-logs-format', type=str, default='parlai', choices=['jsonl', 'parlai', 'forever'], help='File format to save chat logs. (default parlai)') parser.add_argument('-ltim', '--log-every-n-secs', type=float, default=2) parser.set_defaults(interactive_mode=True, task='interactive') LocalHumanAgent.add_cmdline_args(parser) WorldLogger.add_cmdline_args(parser) return parser
def setup_args(parser=None): if parser is None: parser = ParlaiParser(True, True, 'Interactive chat with a model') parser.add_argument('-d', '--display-examples', type='bool', default=False) parser.add_argument( '--display-prettify', type='bool', default=False, help='Set to use a prettytable when displaying ' 'examples with text candidates', ) parser.add_argument( '--display-ignore-fields', type=str, default='label_candidates,text_candidates', help='Do not display these fields', ) parser.add_argument( '-it', '--interactive-task', type='bool', default=True, help='Create interactive version of task', ) ''' parser.add_argument( '-hi', '--history', type=str, default='', help='context history beyond the initial query', ) parser.add_argument( '-hist', '--human_input', type=str, default='Hello.', help='Human input message to the agent.', ) parser.add_argument( '-sampcans', '--sampled_candidates', type=str, default='', help='Sampled candidates', ) ''' parser.set_defaults(interactive_mode=True, task='interactive') LocalHumanAgent.add_cmdline_args(parser) return parser
def setup_args(parser=None): if parser is None: parser = ParlaiParser( True, True, 'Interactive chat with a model on the command line') parser.add_argument('-d', '--display-examples', type='bool', default=False) parser.add_argument( '--display-prettify', type='bool', default=False, help='Set to use a prettytable when displaying ' 'examples with text candidates', ) parser.add_argument( '--display-add-fields', type=str, default='', help= 'Display these fields when verbose is off (e.g., "--display-add-fields label_candidates,beam_texts")', ) parser.add_argument( '-it', '--interactive-task', type='bool', default=True, help='Create interactive version of task', ) parser.add_argument( '--outfile', type=str, default='', help='Saves a jsonl file containing all of the task examples and ' 'model replies. Set to the empty string to not save at all', ) parser.add_argument( '--save-format', type=str, default='conversations', choices=['conversations', 'parlai'], help= 'Format to save logs in. conversations is a jsonl format, parlai is a text format.', ) parser.set_defaults(interactive_mode=True, task='interactive') LocalHumanAgent.add_cmdline_args(parser, partial_opt=None) WorldLogger.add_cmdline_args(parser, partial_opt=None) return parser
def setup_args(parser=None): if parser is None: parser = ParlaiParser(True, True, 'Interactive chat with a model') parser.add_argument('-d', '--display-examples', type='bool', default=False) parser.add_argument( '--display-prettify', type='bool', default=False, help='Set to use a prettytable when displaying ' 'examples with text candidates', ) parser.add_argument( '--display-ignore-fields', type=str, default='label_candidates,text_candidates', help='Do not display these fields', ) parser.set_defaults(model_file='models:convai2/kvmemnn/model') LocalHumanAgent.add_cmdline_args(parser) return parser