Analyzer - Support regex in annotations of benchmark naming for metrics in rules (#344)
**Description** Support regex in annotations of benchmark naming for metrics in rules. For example: metrics: \- model-benchmarks:resnet50:float/.\*/fp16_train_throughput' -> \- 'model-benchmarks:.\*/.\*/fp16_train_throughput'
This commit is contained in:
Родитель
4fae22185f
Коммит
c770ed5de2
|
@ -32,6 +32,9 @@ class RuleBase():
|
|||
logger.warning('RuleBase: get_metrics_by_benchmarks - {} does not have benchmark_name'.format(metric))
|
||||
else:
|
||||
benchmark = metric.split('/')[0]
|
||||
# support annotations in benchmark naming
|
||||
if ':' in benchmark:
|
||||
benchmark = metric.split(':')[0]
|
||||
if benchmark not in benchmarks_metrics:
|
||||
benchmarks_metrics[benchmark] = set()
|
||||
benchmarks_metrics[benchmark].add(metric)
|
||||
|
|
Загрузка…
Ссылка в новой задаче