Skip to content

Commit

Permalink
Make filename optional in update_failures.py (pytorch#119289)
Browse files Browse the repository at this point in the history
Pull Request resolved: pytorch#119289
Approved by: https://github.com/zou3519
  • Loading branch information
jansel authored and pytorchmergebot committed Feb 6, 2024
1 parent 422b427 commit 0f68bca
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion scripts/compile_tests/update_failures.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/usr/bin/env python3
import argparse
import pathlib

from common import (
download_reports,
Expand Down Expand Up @@ -200,7 +202,15 @@ def read_test_results(directory):
description="Read from logs and update the dynamo_test_failures file",
)
# dynamo_test_failures path
parser.add_argument("filename")
parser.add_argument(
"filename",
nargs="?",
default=str(
pathlib.Path(__file__).absolute().parent.parent.parent
/ "torch/testing/_internal/dynamo_test_failures.py"
),
help="Optional path to dynamo_test_failures.py",
)
parser.add_argument(
"commit",
help=(
Expand All @@ -214,5 +224,6 @@ def read_test_results(directory):
action="store_true",
)
args = parser.parse_args()
assert pathlib.Path(args.filename).exists(), args.filename
dynamo38, dynamo311 = download_reports(args.commit, ("dynamo38", "dynamo311"))
update(args.filename, dynamo38, dynamo311, args.also_remove_skips)

0 comments on commit 0f68bca

Please sign in to comment.