mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Preferring dash over underscore in command-line options. Add `--command-arg-name` to the argument parser. The old arguments with underscores `--command_arg_name` are kept for backward compatibility.
Both dashes and underscores are used in the PyTorch codebase. Some argument parsers only have dashes or only have underscores in arguments. For example, the `torchrun` utility for distributed training only accepts underscore arguments (e.g., `--master_port`). The dashes are more common in other command-line tools. And it looks to be the default choice in the Python standard library:
`argparse.BooleanOptionalAction`:
|
||
|---|---|---|
| .. | ||
| bench_gen | ||
| aot_model_compiler.cc | ||
| at_launch_benchmark.cc | ||
| benchmark_args.h | ||
| benchmark_helper.cc | ||
| benchmark_helper.h | ||
| caffe2_benchmark.cc | ||
| CMakeLists.txt | ||
| compare_models_torch.cc | ||
| convert_and_benchmark.cc | ||
| convert_caffe_image_db.cc | ||
| convert_db.cc | ||
| convert_encoded_to_raw_leveldb.cc | ||
| convert_image_to_tensor.cc | ||
| core_overhead_benchmark_gpu.cc | ||
| core_overhead_benchmark.cc | ||
| db_throughput.cc | ||
| dump_operator_names.cc | ||
| inspect_gpu.cc | ||
| intra_inter_benchmark.cc | ||
| lite_interpreter_model_load.cc | ||
| load_benchmark_torch.cc | ||
| make_cifar_db.cc | ||
| make_image_db.cc | ||
| make_mnist_db.cc | ||
| optimize_for_mobile.cc | ||
| parallel_info.cc | ||
| predictor_verifier.cc | ||
| print_core_object_sizes_gpu.cc | ||
| print_registered_core_operators.cc | ||
| record_function_benchmark.cc | ||
| run_plan_mpi.cc | ||
| run_plan.cc | ||
| speed_benchmark_torch.cc | ||
| speed_benchmark.cc | ||
| split_db.cc | ||
| tsv_2_proto.cc | ||
| tutorial_blob.cc | ||
| zmq_feeder.cc | ||