Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions benchmarks/torchbench_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def _find_near_file(self, names):

Looks for `names` in the current directory, up to its two direct parents.
"""
for dir in ("./", "../", "../../"):
for dir in ("./", "../", "../../", "../../../"):
for name in names:
path = os.path.join(dir, name)
if exists(path):
Expand Down Expand Up @@ -193,7 +193,7 @@ def get_skip_data(self):
its lists of models into sets of models.
"""

benchmarks_dir = self._find_near_file(("benchmarks",))
benchmarks_dir = self._find_near_file(("pytorch/benchmarks",))
Copy link
Collaborator

@ysiraichi ysiraichi Jan 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about this change, instead? Then, we would also need to change the path construction below.

Suggested change
benchmarks_dir = self._find_near_file(("pytorch/benchmarks",))
benchmarks_dir = self._find_near_file(("benchmarks/dynamo",))

Copy link
Member Author

@zpcore zpcore Jan 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ysiraichi, if you have a better fix in mind, can you create PR since you are more familiar with the code you created? I will drop this one. I am a bit concerned about adding ../../../ in this PR.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, just notice there is still an issue with the PR you made for the fix. I just quickly reverted it so it won't block our benchmark automation run. I will merge this one first for the quick fix...

assert benchmarks_dir is not None, "PyTorch benchmarks folder not found."

skip_file = os.path.join(benchmarks_dir, "dynamo",
Expand Down