MCPcopy Create free account
hub / github.com/awslabs/gap-text2sql / add_parser

Function add_parser

rat-sql-gap/seq2struct/commands/infer.py:204–222  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

202
203
204def add_parser():
205 parser = argparse.ArgumentParser()
206 parser.add_argument('--logdir', required=True)
207 parser.add_argument('--config', required=True)
208 parser.add_argument('--config-args')
209
210 parser.add_argument('--step', type=int)
211 parser.add_argument('--section', required=True)
212 parser.add_argument('--output', required=True)
213 parser.add_argument('--beam-size', required=True, type=int)
214 parser.add_argument('--output-history', action='store_true')
215 parser.add_argument('--limit', type=int)
216 parser.add_argument('--mode', default='infer', choices=['infer', 'debug', 'visualize_attention'])
217 parser.add_argument('--use_heuristic', action='store_true')
218 parser.add_argument('--res1', default='outputs/glove-sup-att-1h-0/outputs.json')
219 parser.add_argument('--res2', default='outputs/glove-sup-att-1h-1/outputs.json')
220 parser.add_argument('--res3', default='outputs/glove-sup-att-1h-2/outputs.json')
221 args = parser.parse_args()
222 return args
223
224def main(args):
225 if args.config_args:

Callers 1

infer.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected