Skip to content

Commit 00973fb

Browse files
committed
fixed metric comparison
1 parent 0ebc186 commit 00973fb

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

compare_benchmarks.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,21 @@ def group_results_by_config(results: List[Dict[str, Any]]) -> Dict[str, Dict[str
5757
if not metrics:
5858
continue
5959

60-
# Create a configuration key that uniquely identifies this benchmark configuration
60+
# Create a normalized configuration key that uniquely identifies this benchmark configuration
61+
# but ignores object IDs which can change between runs
6162
config_key = f"{dataset}|"
62-
config_key += "|".join([f"{k}={v}" for k, v in sorted(params.items())])
63+
64+
# Filter out object IDs from parameters (they contain memory addresses like @aced190)
65+
normalized_params = {}
66+
for k, v in sorted(params.items()):
67+
# If the value is a string containing an object ID (contains @ symbol),
68+
# only keep the parameter name but not the specific object ID
69+
if isinstance(v, str) and '@' in v:
70+
normalized_params[k] = k # Just use the parameter name
71+
else:
72+
normalized_params[k] = v
73+
74+
config_key += "|".join([f"{k}={normalized_params[k]}" for k in sorted(normalized_params.keys())])
6375

6476
# Store all metrics for this configuration
6577
if config_key not in grouped_results:

0 commit comments

Comments
 (0)