Skip to content

Commit

Permalink
fix load dir logic
Browse files Browse the repository at this point in the history
  • Loading branch information
AndSonder committed Nov 20, 2023
1 parent 5cfd132 commit 0bff0af
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,10 @@ def process_one_machine_log(log_dir, multi_machine_idx=-1):
if args.multi_machine:
multi_machine_dirs = os.listdir(args.log_dir)
multi_machine_dirs = [
os.path.join(args.log_dir, f"machine{i}")
for i in range(len(multi_machine_dirs))
if os.path.isdir(os.path.join(args.log_dir, f"machine{i}"))
os.path.join(args.log_dir, d)
for d in multi_machine_dirs
if d.startswith("machine")
and os.path.isdir(os.path.join(args.log_dir, d))
]
machine_num = len(multi_machine_dirs)
for i, d in enumerate(multi_machine_dirs):
Expand Down

0 comments on commit 0bff0af

Please sign in to comment.