Skip to content

Commit d8bf122

Browse files
authored
Make low disk usage the default in mobilenet run (#264)
1 parent f8e76e5 commit d8bf122

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

script/run-mlperf-inference-mobilenet-models/customize.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,18 @@ def preprocess(i):
5050
}
5151

5252
models = {}
53-
if env.get('MLC_MLPERF_RUN_MOBILENET_V1', '') == "yes":
53+
if is_true(env.get('MLC_MLPERF_RUN_MOBILENET_V1', '')):
5454
models['mobilenet'] = {}
5555
models['mobilenet']['v1'] = models_all['mobilenet']['v1']
56-
elif env.get('MLC_MLPERF_RUN_MOBILENET_V2', '') == "yes":
56+
elif is_true(env.get('MLC_MLPERF_RUN_MOBILENET_V2', '')):
5757
models['mobilenet'] = {}
5858
models['mobilenet']['v2'] = models_all['mobilenet']['v2']
59-
elif env.get('MLC_MLPERF_RUN_MOBILENET_V3', '') == "yes":
59+
elif is_true(env.get('MLC_MLPERF_RUN_MOBILENET_V3', '')):
6060
models['mobilenet'] = {}
6161
models['mobilenet']['v3'] = models_all['mobilenet']['v3']
62-
elif env.get('MLC_MLPERF_RUN_MOBILENETS', '') == "yes":
62+
elif is_true(env.get('MLC_MLPERF_RUN_MOBILENETS', '')):
6363
models['mobilenet'] = models_all['mobilenet']
64-
elif env.get('MLC_MLPERF_RUN_EFFICIENTNETS', '') == "yes":
64+
elif is_true(env.get('MLC_MLPERF_RUN_EFFICIENTNETS', '')):
6565
models['efficientnet'] = models_all['efficientnet']
6666

6767
variation_strings = {}
@@ -90,16 +90,16 @@ def preprocess(i):
9090
variation_list.append("_" + k3)
9191
variation_strings[t1].append(",".join(variation_list))
9292

93-
if env.get('MLC_MLPERF_SUBMISSION_MODE', '') == "yes":
93+
if is_true(env.get('MLC_MLPERF_SUBMISSION_MODE', '')):
9494
var = "_submission"
9595
execution_mode = "valid"
96-
elif env.get('MLC_MLPERF_ACCURACY_MODE', '') == "yes" and env.get('MLC_MLPERF_PERFORMANCE_MODE', '') == "yes":
96+
elif is_true(env.get('MLC_MLPERF_ACCURACY_MODE', '')) and is_true(env.get('MLC_MLPERF_PERFORMANCE_MODE', '')):
9797
var = "_full,_performance-and-accuracy"
9898
execution_mode = "valid"
99-
elif env.get('MLC_MLPERF_ACCURACY_MODE', '') == "yes":
99+
elif is_true(env.get('MLC_MLPERF_ACCURACY_MODE', '')):
100100
var = "_full,_accuracy-only"
101101
execution_mode = "valid"
102-
elif env.get('MLC_MLPERF_PERFORMANCE_MODE', '') == "yes":
102+
elif is_true(env.get('MLC_MLPERF_PERFORMANCE_MODE', '')):
103103
var = "_full,_performance-only"
104104
execution_mode = "valid"
105105
else:
@@ -178,21 +178,21 @@ def preprocess(i):
178178
if env.get('MLC_MLPERF_INFERENCE_SUBMISSION_DIR', '') != '':
179179
mlc_input['submission_dir'] = env['MLC_MLPERF_INFERENCE_SUBMISSION_DIR']
180180

181-
if env.get('MLC_MLPERF_FIND_PERFORMANCE_MODE', '') == "yes" and env.get(
182-
'MLC_MLPERF_NO_RERUN', '') != 'yes':
181+
if is_true(env.get('MLC_MLPERF_FIND_PERFORMANCE_MODE', '')) and not is_true(env.get(
182+
'MLC_MLPERF_NO_RERUN', '')):
183183
mlc_input['rerun'] = True
184184

185-
if env.get('MLC_MLPERF_POWER', '') == "yes":
185+
if is_true(env.get('MLC_MLPERF_POWER', '')):
186186
mlc_input['power'] = 'yes'
187187

188-
if env.get('MLC_MLPERF_ACCURACY_MODE', '') == "yes":
188+
if is_true(env.get('MLC_MLPERF_ACCURACY_MODE', '')):
189189
mlc_input['mode'] = 'accuracy'
190190
print(mlc_input)
191191
r = mlc.access(mlc_input)
192192
if r['return'] > 0:
193193
return r
194194

195-
if env.get('MLC_MLPERF_PERFORMANCE_MODE', '') == "yes":
195+
if is_true(env.get('MLC_MLPERF_PERFORMANCE_MODE', '')):
196196
mlc_input['mode'] = 'performance'
197197

198198
print(mlc_input)

script/run-mlperf-inference-mobilenet-models/meta.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ default_env:
99
MLC_MLPERF_RUN_INT8: 'yes'
1010
MLC_MLPERF_RUN_MOBILENETS: 'no'
1111
MLC_USE_DATASET_FROM_HOST: 'yes'
12+
MLC_MINIMIZE_DISK_SPACE: 'yes'
1213
deps:
1314
- tags: get,sys-utils-mlc
1415
docker:

0 commit comments

Comments
 (0)