-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathrun.py
More file actions
60 lines (50 loc) · 1.48 KB
/
run.py
File metadata and controls
60 lines (50 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
"""Script to compute analysis of T4 datasets."""
import argparse
from mmengine.logging import print_log
from tools.analysis_3d.analysis_runner import AnalysisRunner
def parse_args():
"""Add args and parse them through CLI."""
parser = argparse.ArgumentParser(description="Create data info for T4dataset")
parser.add_argument(
"--config_path",
type=str,
required=True,
help="config for T4dataset",
)
parser.add_argument(
"--data_root_path",
type=str,
required=True,
help="specify the root path of dataset",
)
parser.add_argument(
"--dataset_version_config_root",
type=str,
required=True,
help="specify the root path of dataset version config yaml files",
)
parser.add_argument(
"-o",
"--out_dir",
type=str,
required=True,
help="output directory of info file",
)
args = parser.parse_args()
return args
def main():
"""Main enrtypoint to run the Runner."""
args = parse_args()
# Build AnalysesRunner
print_log("Building AnalysisRunner...", logger="current")
analysis_runner = AnalysisRunner(
data_root_path=args.data_root_path,
dataset_version_config_root=args.dataset_version_config_root,
config_path=args.config_path,
out_path=args.out_dir,
)
print_log("Built AnalysisRunner!")
# Run AnalysesRunner
analysis_runner.run()
if __name__ == "__main__":
main()