Skip to content

Commit aad848b

Browse files
committed
[script] remove get_latest_run_dir_number out of util
1 parent e36c1b7 commit aad848b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

vtr_flow/scripts/python_libs/vtr/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
argparse_str2bool,
1717
get_existing_run_dir,
1818
get_latest_run_dir,
19-
get_latest_run_number,
2019
get_next_run_dir,
2120
verify_file,
2221
pretty_print_table,

vtr_flow/scripts/python_libs/vtr/parse_vtr_task.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from pathlib import Path
88
from pathlib import PurePath
99
import sys
10+
import os
1011
import argparse
1112
import textwrap
1213
import shutil
@@ -24,15 +25,14 @@
2425
load_pass_requirements,
2526
load_parse_results,
2627
parse_vtr_flow,
27-
get_latest_run_number,
2828
pretty_print_table,
2929
find_task_dir,
3030
CommandError,
3131
InspectError,
3232
VtrError,
3333
create_jobs,
3434
paths,
35-
set_global_run_dir_number,
35+
set_global_run_dir,
3636
)
3737

3838
# pylint: enable=wrong-import-position
@@ -131,7 +131,7 @@ def vtr_command_argparser(prog=None):
131131
help="QoR geomeans are not computed by default",
132132
)
133133

134-
parser.add_argument("-run", default=None, type=int, help="Run number to parse. If not provided, the latest run will be parsed.")
134+
parser.add_argument("-run", default=None, type=str, help="Parse the specified run directory. Defaults to the latest.")
135135

136136
parser.add_argument("-revision", default="", help="Revision number")
137137

@@ -146,7 +146,7 @@ def vtr_command_main(arg_list, prog=None):
146146
# Load the arguments
147147
args = vtr_command_argparser(prog).parse_args(arg_list)
148148
if args.run is not None:
149-
set_global_run_dir_number(args.run)
149+
set_global_run_dir(args.run)
150150
try:
151151
task_names = args.task
152152

@@ -527,8 +527,9 @@ def calc_geomean(args, configs):
527527
print("date\trevision", file=out)
528528
first = False
529529
lines = summary.readlines()
530+
run_dir_name = os.path.basename(get_latest_run_dir(find_task_dir(configs[0], args.alt_tasks_dir)))
530531
print(
531-
get_latest_run_number(find_task_dir(configs[0], args.alt_tasks_dir)),
532+
run_dir_name,
532533
file=out,
533534
end="\t",
534535
)

0 commit comments

Comments
 (0)