Skip to content

Commit 88fa115

Browse files
committed
Change to store_true for simpler cli usage
1 parent 970e189 commit 88fa115

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

utils/arg_parser.py

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ def get_args():
3535

3636
parser.add_argument(
3737
"--download-data",
38-
type=bool,
39-
default=False,
38+
action="store_true",
4039
help="Whether the data should be downloaded or not. Might cause code to start a bit slowly.",
4140
)
4241

@@ -70,20 +69,15 @@ def get_args():
7069
nargs="+",
7170
help="Which metric to use for evaluation",
7271
)
73-
74-
parser.add_argument(
75-
'--imagesize',
76-
type=int,
77-
default=28,
78-
help='Imagesize'
79-
)
80-
72+
73+
parser.add_argument("--imagesize", type=int, default=28, help="Imagesize")
74+
8175
parser.add_argument(
82-
'--nr_channels',
76+
"--nr_channels",
8377
type=int,
8478
default=1,
85-
choices=[1,3],
86-
help='Number of image channels'
79+
choices=[1, 3],
80+
help="Number of image channels",
8781
)
8882

8983
# Training specific values

0 commit comments

Comments
 (0)