Skip to content

Commit 38bb46b

Browse files
Format help text
1 parent a26041e commit 38bb46b

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

.automation_scripts/run_pytorch_unit_tests.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -415,22 +415,23 @@ def run_test_and_summarize_results(
415415
return res_all_tests_dict
416416

417417
def parse_args():
418-
parser = argparse.ArgumentParser(description='Run PyTorch unit tests and generate xml results summary')
418+
parser = argparse.ArgumentParser(description='Run PyTorch unit tests and generate xml results summary', formatter_class=argparse.RawTextHelpFormatter)
419419
parser.add_argument('--test_config', nargs='+', default=[], type=str, help="space-separated list of test workflows to be executed eg. 'default distributed'")
420420
parser.add_argument('--priority_tests', action='store_true', help="run priority tests only")
421421
parser.add_argument('--default_list', nargs='+', default=[], help="space-separated list of 'default' config test suites/files to be executed eg. 'test_weak test_dlpack'")
422422
parser.add_argument('--distributed_list', nargs='+', default=[], help="space-separated list of 'distributed' config test suites/files to be executed eg. 'distributed/test_c10d_common distributed/test_c10d_nccl'")
423423
parser.add_argument('--inductor_list', nargs='+', default=[], help="space-separated list of 'inductor' config test suites/files to be executed eg. 'inductor/test_torchinductor test_ops'")
424-
parser.add_argument('--pytorch_root', default='/var/lib/jenkins/pytorch', type=str, help="PyTorch root directory")
425-
parser.add_argument('--example_output', type=str, help="{'workflow_name': {"
426-
"test_file_and_status(file_name='workflow_aggregate', status='STATISTICS'): {}, "
427-
"test_file_and_status(file_name='test_file_name_1', status='ERROR'): {}, "
428-
"test_file_and_status(file_name='test_file_name_1', status='FAILED'): {}, "
429-
"test_file_and_status(file_name='test_file_name_1', status='PASSED'): {}, "
430-
"test_file_and_status(file_name='test_file_name_1', status='SKIPPED'): {}, "
431-
"test_file_and_status(file_name='test_file_name_1', status='STATISTICS'): {}}}")
432-
parser.add_argument('--example_usages', type=str, help="RUN ALL TESTS: python run_pytorch_unit_tests.py "
433-
"RUN PRIORITY TESTS: python run_pytorch_unit_tests.py --test_config distributed --priority_test "
424+
parser.add_argument('--pytorch_root', default='.', type=str, help="PyTorch root directory")
425+
parser.add_argument('--example_output', type=str, help="{'workflow_name': {\n"
426+
" test_file_and_status(file_name='workflow_aggregate', status='STATISTICS'): {}, \n"
427+
" test_file_and_status(file_name='test_file_name_1', status='ERROR'): {}, \n"
428+
" test_file_and_status(file_name='test_file_name_1', status='FAILED'): {}, \n"
429+
" test_file_and_status(file_name='test_file_name_1', status='PASSED'): {}, \n"
430+
" test_file_and_status(file_name='test_file_name_1', status='SKIPPED'): {}, \n"
431+
" test_file_and_status(file_name='test_file_name_1', status='STATISTICS'): {} \n"
432+
"}}\n")
433+
parser.add_argument('--example_usages', type=str, help="RUN ALL TESTS: python run_pytorch_unit_tests.py \n"
434+
"RUN PRIORITY TESTS: python run_pytorch_unit_tests.py --test_config distributed --priority_test \n"
434435
"RUN SELECTED TESTS: python run_pytorch_unit_tests.py --default_list test_weak test_dlpack --inductor_list inductor/test_torchinductor")
435436
return parser.parse_args()
436437

0 commit comments

Comments
 (0)