mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
[FR] Make trace_dir a required argument (#135157)
Ensures users get a clean error if they forget to specify the dir, and improves the help message. Pull Request resolved: https://github.com/pytorch/pytorch/pull/135157 Approved by: https://github.com/c-p-i-o, https://github.com/fduwjj
This commit is contained in:
committed by
PyTorch MergeBot
parent
a681260caf
commit
06e414d7fe
@ -17,9 +17,9 @@ class JobConfig:
|
||||
self.parser = argparse.ArgumentParser(
|
||||
description="PyTorch Flight recorder analyzing script."
|
||||
)
|
||||
|
||||
self.parser.add_argument(
|
||||
"-d", "--dir", required=True, help="Directory with flight recorder dumps"
|
||||
"trace_dir",
|
||||
help="Directory containing one trace file per rank, named with <prefix>_<rank>.",
|
||||
)
|
||||
self.parser.add_argument(
|
||||
"--selected-ranks",
|
||||
|
@ -40,7 +40,7 @@ from tools.flight_recorder.components.types import types
|
||||
def main(args: Optional[Sequence[str]] = None) -> None:
|
||||
config = JobConfig()
|
||||
args = config.parse_args(args)
|
||||
details, version = read_dir(args.prefix, args.dir)
|
||||
details, version = read_dir(args.prefix, args.trace_dir)
|
||||
db = build_db(details, args, version)
|
||||
if args.output:
|
||||
with open(args.output, "wb") as f:
|
||||
|
Reference in New Issue
Block a user