Update agents/ensemble_weights.py
Browse files
agents/ensemble_weights.py
CHANGED
@@ -124,7 +124,7 @@ class ModelWeightManager:
|
|
124 |
"""Check if models agree on prediction"""
|
125 |
agent_logger.log("weight_optimization", "info", "Checking for consensus among model predictions.")
|
126 |
non_none_predictions = [p.get("Label") for p in predictions.values() if p is not None and isinstance(p, dict) and p.get("Label") is not None and p.get("Label") != "Error"]
|
127 |
-
agent_logger.
|
128 |
result = len(non_none_predictions) > 0 and len(set(non_none_predictions)) == 1
|
129 |
agent_logger.log("weight_optimization", "info", f"Consensus detected: {result}")
|
130 |
return result
|
|
|
124 |
"""Check if models agree on prediction"""
|
125 |
agent_logger.log("weight_optimization", "info", "Checking for consensus among model predictions.")
|
126 |
non_none_predictions = [p.get("Label") for p in predictions.values() if p is not None and isinstance(p, dict) and p.get("Label") is not None and p.get("Label") != "Error"]
|
127 |
+
agent_logger.log("weight_optimization", "info", f"Non-none predictions for consensus check: {non_none_predictions}")
|
128 |
result = len(non_none_predictions) > 0 and len(set(non_none_predictions)) == 1
|
129 |
agent_logger.log("weight_optimization", "info", f"Consensus detected: {result}")
|
130 |
return result
|