MCPcopy Create free account
hub / github.com/InternLM/InternBootcamp / parse_args

Function parse_args

verl/scripts/diagnose.py:263–283  ·  view source on GitHub ↗

Parse arguments.

()

Source from the content-addressed store, hash-verified

261
262
263def parse_args():
264 """Parse arguments."""
265 parser = argparse.ArgumentParser(
266 formatter_class=argparse.ArgumentDefaultsHelpFormatter,
267 description="Diagnose script for checking the current system.",
268 )
269 choices = ["python", "pip", "verl", "system", "os", "environment"]
270 for choice in choices:
271 parser.add_argument("--" + choice, default=1, type=int, help="Diagnose {}.".format(choice))
272 parser.add_argument("--network", default=0, type=int, help="Diagnose network.")
273 parser.add_argument("--hardware", default=0, type=int, help="Diagnose hardware.")
274 parser.add_argument(
275 "--region",
276 default="",
277 type=str,
278 help="Additional sites in which region(s) to test. \
279 Specify 'cn' for example to test mirror sites in China.",
280 )
281 parser.add_argument("--timeout", default=10, type=int, help="Connection test timeout threshold, 0 to disable.")
282 args = parser.parse_args()
283 return args
284
285
286if __name__ == "__main__":

Callers 1

diagnose.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected