MCPcopy Create free account
hub / github.com/TPCD/DCCL / _gather_outputs

Method _gather_outputs

project_utils/visualization_utils.py:1132–1146  ·  view source on GitHub ↗
(self, field, log_fields, stat_parent, stat, require_dict=False)

Source from the content-addressed store, hash-verified

1130 return '\t'.join(joined_fields)
1131
1132 def _gather_outputs(self, field, log_fields, stat_parent, stat, require_dict=False):
1133 output = []
1134 name = ''
1135 if isinstance(stat, dict):
1136 log_fields = stat.get(log_fields, [])
1137 name = stat.get('log_name', '.'.join(field))
1138 for f in log_fields:
1139 output.append(f.format(**stat))
1140 elif not require_dict:
1141 name = '.'.join(field)
1142 number_format = stat_parent.get('log_format', '')
1143 unit = stat_parent.get('log_unit', '')
1144 fmt = '{' + number_format + '}' + unit
1145 output.append(fmt.format(stat))
1146 return name, output
1147
1148
1149

Callers 1

_log_allMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected