MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / parse_cmd_line

Function parse_cmd_line

tensorflow/tools/test/upload_test_benchmarks.py:221–239  ·  view source on GitHub ↗

Parse command line options. Returns: The parsed arguments object.

()

Source from the content-addressed store, hash-verified

219
220
221def parse_cmd_line():
222 """Parse command line options.
223
224 Returns:
225 The parsed arguments object.
226 """
227 desc = "Upload benchmark results to datastore."
228 opts = [
229 ("-a", "--archivedir", str, None, True,
230 "Directory where benchmark files are archived."),
231 ("-d", "--datadir", str, None, True,
232 "Directory of benchmark files to upload."),
233 ]
234
235 parser = argparse.ArgumentParser(description=desc)
236 for opt in opts:
237 parser.add_argument(opt[0], opt[1], type=opt[2], default=opt[3],
238 required=opt[4], help=opt[5])
239 return parser.parse_args()
240
241
242def main():

Callers 1

mainFunction · 0.85

Calls 2

add_argumentMethod · 0.80
parse_argsMethod · 0.80

Tested by

no test coverage detected