Upload agents/utils.py with huggingface_hub
Browse files- agents/utils.py +4 -2
agents/utils.py
CHANGED
|
@@ -99,8 +99,8 @@ def run_agent_tests(tests, img, agent_name, modality_adjustments=None):
|
|
| 99 |
r["not_applicable"] = True
|
| 100 |
n_insufficient += 1
|
| 101 |
|
| 102 |
-
# Apply modality adjustment if present
|
| 103 |
-
if modality_adjustments and test_name in modality_adjustments:
|
| 104 |
multiplier = modality_adjustments[test_name]
|
| 105 |
original_score = sc
|
| 106 |
sc = sc * multiplier
|
|
@@ -110,6 +110,8 @@ def run_agent_tests(tests, img, agent_name, modality_adjustments=None):
|
|
| 110 |
r["adjustment_multiplier"] = multiplier
|
| 111 |
if multiplier < 0.5:
|
| 112 |
r["note"] = f"[Modality-suppressed ×{multiplier}] {note}"
|
|
|
|
|
|
|
| 113 |
|
| 114 |
scores.append(sc)
|
| 115 |
except Exception as e:
|
|
|
|
| 99 |
r["not_applicable"] = True
|
| 100 |
n_insufficient += 1
|
| 101 |
|
| 102 |
+
# Apply modality adjustment if present — BUT respect override_suppression
|
| 103 |
+
if modality_adjustments and test_name in modality_adjustments and not r.get("override_suppression", False):
|
| 104 |
multiplier = modality_adjustments[test_name]
|
| 105 |
original_score = sc
|
| 106 |
sc = sc * multiplier
|
|
|
|
| 110 |
r["adjustment_multiplier"] = multiplier
|
| 111 |
if multiplier < 0.5:
|
| 112 |
r["note"] = f"[Modality-suppressed ×{multiplier}] {note}"
|
| 113 |
+
elif r.get("override_suppression"):
|
| 114 |
+
r["note"] = f"[OVERRIDE: suppression bypassed] {note}"
|
| 115 |
|
| 116 |
scores.append(sc)
|
| 117 |
except Exception as e:
|