Skip to content

Commit c2b3fa7

Browse files
committed
Added debug outputs and clearer messages
Signed-off-by: Vicente Zepeda Mas <vzepedam@redhat.com>
1 parent 97547e5 commit c2b3fa7

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

examples/trt-external-payload-node-density-inherits.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ tests :
3434
value: cpu
3535
agg_type: avg
3636
direction: 1
37-
threshold: 10
37+
threshold: 5
3838

orion/config.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,15 +186,18 @@ def merge_configs(config: Dict[str, Any], inherited_config: Dict[str, Any]) -> D
186186
if config is None:
187187
config = {}
188188

189+
logger.debug(f"config: {config}")
190+
logger.debug(f"inherited_config: {inherited_config}")
189191
# Start with a copy of inherited_config
190192
merged = inherited_config.copy()
191193

192194
# Iterate through config keys and add them, overriding inherited_config values
193195
# If a key exists in config, skip adding it from inherited_config (config takes precedence)
194196
for key in config:
195-
logger.info("Replace key %s wiht lower level value", key)
197+
logger.info("Adding key %s with value %s", key, config[key])
196198
merged[key] = config[key]
197199

200+
logger.debug(f"merged config: {merged}")
198201
return merged
199202

200203
def merge_lists(metrics: List[Any], inherited_metrics: List[Any]) -> List[Any]:
@@ -213,6 +216,8 @@ def merge_lists(metrics: List[Any], inherited_metrics: List[Any]) -> List[Any]:
213216
if metrics is None:
214217
metrics = []
215218

219+
logger.debug(f"metrics: {metrics}")
220+
logger.debug(f"inherited_metrics: {inherited_metrics}")
216221
merged = []
217222

218223
# Iterate through metrics keys and add them, overriding inherited_metrics values
@@ -226,4 +231,5 @@ def merge_lists(metrics: List[Any], inherited_metrics: List[Any]) -> List[Any]:
226231
merged.append(m)
227232
merged.extend(metrics)
228233

234+
logger.debug(f"merged metrics: {merged}")
229235
return merged

0 commit comments

Comments
 (0)