-
Notifications
You must be signed in to change notification settings - Fork 539
/
__init__.py
50 lines (44 loc) · 1.27 KB
/
__init__.py
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
#
# For licensing see accompanying LICENSE file.
# Copyright (C) 2024 Apple Inc. All Rights Reserved.
#
import argparse
from corenet.utils.registry import Registry
METRICS_REGISTRY = Registry(
"metrics",
lazy_load_dirs=["corenet/metrics"],
internal_dirs=["corenet/internal", "corenet/internal/projects/*"],
)
def arguments_stats(parser: argparse.ArgumentParser):
group = parser.add_argument_group(title="Statistics", description="Statistics")
group.add_argument(
"--stats.val", type=str, default=["loss"], nargs="+", help="Name of statistics"
)
group.add_argument(
"--stats.train",
type=str,
default=["loss"],
nargs="+",
help="Name of statistics",
)
group.add_argument(
"--stats.checkpoint-metric",
type=str,
default="loss",
help="Metric to use for saving checkpoints",
)
group.add_argument(
"--stats.checkpoint-metric-max",
action="store_true",
default=False,
help="Maximize checkpoint metric",
)
group.add_argument(
"--stats.coco-map.iou-types",
type=str,
default=["bbox"],
nargs="+",
choices=("bbox", "segm"),
help="Types of IOU to compute for MSCoco.",
)
return parser