@@ -175,6 +175,15 @@ def __init__(self):
175
175
"generated and used at every iteration."
176
176
)
177
177
178
+ self ._parser .add_argument (
179
+ "--precision" ,
180
+ type = str ,
181
+ choices = self .ALLOWED_PRECISION_MODES ,
182
+ default = "FP32" ,
183
+ help = "Precision mode to use. FP16 and INT8 modes only works if "
184
+ "--use_tftrt is used."
185
+ )
186
+
178
187
# =========================== TF-TRT Flags ========================== #
179
188
180
189
self ._add_bool_argument (
@@ -232,23 +241,38 @@ def __init__(self):
232
241
help = "If set to True, TensorRT engines are built before runtime."
233
242
)
234
243
235
- self ._parser .add_argument (
236
- "--precision" ,
237
- type = str ,
238
- choices = self .ALLOWED_PRECISION_MODES ,
239
- default = "FP32" ,
240
- help = "Precision mode to use. FP16 and INT8 modes only works if "
241
- "--use_tftrt is used."
242
- )
243
-
244
244
self ._add_bool_argument (
245
245
name = "use_dynamic_shape" ,
246
246
default = False ,
247
247
required = False ,
248
248
help = "Whether to use implicit batch mode or dynamic shape mode."
249
249
)
250
250
251
- # =========================== DEBUG Flags ========================== #
251
+ # =========================== Metric Flags ========================== #
252
+
253
+ self ._parser .add_argument (
254
+ "--experiment_name" ,
255
+ type = str ,
256
+ default = None ,
257
+ help = "Name of the experiment being run, only used for archiving "
258
+ "objectives: exports in JSON or CSV."
259
+ )
260
+
261
+ self ._parser .add_argument (
262
+ "--model_name" ,
263
+ type = str ,
264
+ required = True ,
265
+ default = None ,
266
+ help = "Name of the model being benchmarked."
267
+ )
268
+
269
+ self ._parser .add_argument (
270
+ "--model_source" ,
271
+ type = str ,
272
+ required = True ,
273
+ default = None ,
274
+ help = "Source of the model where it was originally published."
275
+ )
252
276
253
277
self ._parser .add_argument (
254
278
"--export_metrics_json_path" ,
@@ -266,6 +290,16 @@ def __init__(self):
266
290
"to the set location in CSV format for further processing."
267
291
)
268
292
293
+ self ._parser .add_argument (
294
+ "--upload_metrics_endpoint" ,
295
+ type = str ,
296
+ default = None ,
297
+ help = "If set, the benchmark will upload the metrics in JSON format "
298
+ "to the set endpoint using a PUT requests."
299
+ )
300
+
301
+ # =========================== TF Profiling =========================== #
302
+
269
303
self ._parser .add_argument (
270
304
"--tf_profile_export_path" ,
271
305
type = str ,
@@ -281,6 +315,8 @@ def __init__(self):
281
315
help = "If set to True, will add extra information to the TF Profile."
282
316
)
283
317
318
+ # ============================ Debug Flags =========================== #
319
+
284
320
self ._add_bool_argument (
285
321
name = "debug" ,
286
322
default = False ,
@@ -388,6 +424,9 @@ def _validate_args(self, args):
388
424
"doesn't exist or is not a directory"
389
425
)
390
426
427
+ if args .upload_metrics_endpoint is not None :
428
+ raise NotImplementedError ("This feature is not yet implemented." )
429
+
391
430
def _post_process_args (self , args ):
392
431
if args .use_synthetic_data :
393
432
# This variable is not used in synthetic data mode.
0 commit comments