Datasets:
Tasks:
Visual Question Answering
Modalities:
Image
Formats:
imagefolder
Languages:
English
Size:
< 1K
License:
Fix JSON truncation handling & set max_new_tokens to 1024 in run_eval_mac.py
Browse files
mac_inspector_eval_pack/run_eval_mac.py
CHANGED
|
@@ -347,6 +347,7 @@ def run_single_model_eval(
|
|
| 347 |
base_model_path=base_model,
|
| 348 |
adapter_path=adapter_path,
|
| 349 |
device_str=device_str,
|
|
|
|
| 350 |
)
|
| 351 |
|
| 352 |
# 4. Initialize Rule Library (0 rules by default in cold-start mode)
|
|
@@ -484,7 +485,10 @@ def run_single_model_eval(
|
|
| 484 |
insp_time = time.time() - t_insp
|
| 485 |
except Exception as e:
|
| 486 |
print(f" [Inspector Inference Error]: {e}")
|
| 487 |
-
|
|
|
|
|
|
|
|
|
|
| 488 |
|
| 489 |
if retry_idx == 0:
|
| 490 |
first_verdict = verdict.status
|
|
|
|
| 347 |
base_model_path=base_model,
|
| 348 |
adapter_path=adapter_path,
|
| 349 |
device_str=device_str,
|
| 350 |
+
max_new_tokens=1024,
|
| 351 |
)
|
| 352 |
|
| 353 |
# 4. Initialize Rule Library (0 rules by default in cold-start mode)
|
|
|
|
| 485 |
insp_time = time.time() - t_insp
|
| 486 |
except Exception as e:
|
| 487 |
print(f" [Inspector Inference Error]: {e}")
|
| 488 |
+
from pipeline.contracts import InspectorResult
|
| 489 |
+
verdict = InspectorResult.fail(new_plan=None, repair_rules=active_rules)
|
| 490 |
+
raw_insp = f"Inference exception fallback: {e}"
|
| 491 |
+
insp_time = time.time() - t_insp
|
| 492 |
|
| 493 |
if retry_idx == 0:
|
| 494 |
first_verdict = verdict.status
|