12
12
13
13
from .download import download
14
14
from .make_stats_1 import make_stats_1
15
+ from .get_batch_runs import get_batch_runs
15
16
16
17
17
18
def dir_path (string : str ) -> DirPath :
@@ -37,6 +38,12 @@ def cli_parser() -> argparse.ArgumentParser:
37
38
all .add_argument ("--properties" , type = Path , required = True ,
38
39
help = "Additional properties associated with particular images." )
39
40
41
+ get_batch_runs = mode_parsers .add_parser ("get_batch_runs" , help = "The main entry to this script. Runs get_batch_runs other subentries." )
42
+ get_batch_runs .add_argument ("--batch" , type = str , required = True ,
43
+ help = "The name of the batch to download the runs info for." )
44
+ get_batch_runs .add_argument ("--target" , type = dir_path , required = True ,
45
+ help = "Target file where to put the runs info to." )
46
+
40
47
download = mode_parsers .add_parser ("download" )
41
48
download .add_argument ("--json-file" , type = Path , required = True ,
42
49
help = "The big json file with all the run infos." )
@@ -64,8 +71,10 @@ def parse_args(argv: Sequence[str]) -> argparse.Namespace:
64
71
65
72
66
73
def main_typed (subcommand : str , args : argparse .Namespace ) -> None :
67
- if args .subcommand == 'download' :
68
- download (json_file = args .json_file , root = args .root )
74
+ if args .subcommand == 'all' :
75
+ raise NotImplementedError ()
76
+ elif args .subcommand == 'get-batch-runs' :
77
+ get_batch_runs (batch = args .batch , target = args .target )
69
78
elif args .subcommand == 'make-stats-1' :
70
79
make_stats_1 (input = args .input , output = args .output )
71
80
else :
0 commit comments