Unified human readable output tabbing with Host
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: Ie8ebe783e0e2cd445a0b29431c11302a0675a010
[ROCm/amdsmi commit: 180f893791]
Этот коммит содержится в:
@@ -126,6 +126,18 @@ class AMDSMILogger():
|
||||
|
||||
# First Capitalize all keys in the json object
|
||||
capitalized_json = self._capitalize_keys(json_object)
|
||||
|
||||
# Increase tabbing for device arguments by pulling them out of the main dictionary and assiging them to an empty string
|
||||
tabbed_dictionary = {}
|
||||
for key, value in capitalized_json.items():
|
||||
if key not in ["GPU", "CPU", "CORE"]:
|
||||
tabbed_dictionary[key] = value
|
||||
|
||||
for key, value in tabbed_dictionary.items():
|
||||
del capitalized_json[key]
|
||||
|
||||
capitalized_json["AMDSMI_SPACING_REMOVAL"] = tabbed_dictionary
|
||||
|
||||
json_string = json.dumps(capitalized_json, indent=4)
|
||||
yaml_data = yaml.safe_load(json_string)
|
||||
yaml_output = yaml.dump(yaml_data, sort_keys=False, allow_unicode=True)
|
||||
|
||||
Ссылка в новой задаче
Block a user