Unverified Commit c770ed5d authored by user4543's avatar user4543 Committed by GitHub
Browse files

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'
parent 4fae2218
......@@ -32,6 +32,9 @@ def _get_metrics_by_benchmarks(self, metrics_list):
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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment