Unified configuration for metrics (#726)
* Show description of metrics during analysis
* Use --include-cols Description show the Description column in analyze mode (this is hidden by default)
* Remove tips field from analysis config
* Align metric names in analysis config and documentation
* Add unified config utils/unified_config.yaml
* Add python script utils/split_config.py to auto generate analysis configuration and documentation metrics description
* Add test case to ensure unified config is older than auto-generated config
* Auto generate analysis config and documentation metrics description
* Update CONTRIBUTING.md to add instructions to build documentation assets
* Add docker image and compose file to build documentation
* Update CHANGELOG and Documentation
* Use jinja template instead of hardcoding metric tables in documentation
[ROCm/rocprofiler-compute commit: bb44e90b2d]
Αυτή η υποβολή περιλαμβάνεται σε:
@@ -25,6 +25,7 @@
|
||||
import copy
|
||||
import os
|
||||
import sys
|
||||
import textwrap
|
||||
from abc import ABC, abstractmethod
|
||||
from collections import OrderedDict
|
||||
from pathlib import Path
|
||||
@@ -96,15 +97,28 @@ class OmniAnalyze_Base:
|
||||
sys_info.iloc[0],
|
||||
)
|
||||
|
||||
metric_descriptions = {
|
||||
k: v
|
||||
for dfs in self._arch_configs[args.list_metrics].dfs.values()
|
||||
for k, v in dfs.to_dict().get("Description", {}).items()
|
||||
}
|
||||
for key, value in self._arch_configs[args.list_metrics].metric_list.items():
|
||||
prefix = ""
|
||||
description = ""
|
||||
if "." not in str(key):
|
||||
prefix = ""
|
||||
elif str(key).count(".") == 1:
|
||||
prefix = "\t"
|
||||
else:
|
||||
prefix = "\t\t"
|
||||
print(prefix + key, "->", value)
|
||||
description = metric_descriptions.get(key, "")
|
||||
print(prefix + key, "->", value + "\n")
|
||||
if description:
|
||||
print(
|
||||
prefix
|
||||
+ f"\n{prefix}".join(textwrap.wrap(description, width=40))
|
||||
+ "\n"
|
||||
)
|
||||
sys.exit(0)
|
||||
else:
|
||||
console_error("Unsupported arch")
|
||||
|
||||
Αναφορά σε νέο ζήτημα
Block a user