Sravanth18 commited on
Commit
f7d0296
·
verified ·
1 Parent(s): 0b0e991

Upload run_pipeline_batched.py

Browse files
Files changed (1) hide show
  1. run_pipeline_batched.py +8 -4
run_pipeline_batched.py CHANGED
@@ -80,12 +80,16 @@ def run_batched(
80
  case_id=case.id,
81
  )
82
 
83
- det_contras = check_contradictions(spans, case.question)
84
- if det_contras:
 
85
  existing_ids = {c.claim_id for c in verifier_out.claims}
86
- for dc in det_contras:
87
  if dc.claim_id not in existing_ids:
88
  verifier_out.claims.append(dc)
 
 
 
89
 
90
  gate_out = apply_gate(
91
  question=case.question,
@@ -146,7 +150,7 @@ def run_batched(
146
  def main():
147
  parser = argparse.ArgumentParser()
148
  parser.add_argument("--cases", type=str, default=None)
149
- parser.add_argument("--output", type=str, default="results/verity_pipeline_v0.3.2.jsonl")
150
  parser.add_argument("--batch-size", type=int, default=25, help="Print progress every N cases")
151
  parser.add_argument("--delay", type=float, default=0.5, help="Seconds between cases")
152
  parser.add_argument("--skip-calibration", action="store_true")
 
80
  case_id=case.id,
81
  )
82
 
83
+ conflict_result = check_contradictions(spans, case.question)
84
+ # v0.4: Only FORCED contradictions (status-pair) gate to contradiction.
85
+ if conflict_result.forced:
86
  existing_ids = {c.claim_id for c in verifier_out.claims}
87
+ for dc in conflict_result.forced:
88
  if dc.claim_id not in existing_ids:
89
  verifier_out.claims.append(dc)
90
+ if conflict_result.possible:
91
+ pc_texts = [pc.claim_text for pc in conflict_result.possible]
92
+ verifier_out.filter_stats["possible_conflicts"] = pc_texts
93
 
94
  gate_out = apply_gate(
95
  question=case.question,
 
150
  def main():
151
  parser = argparse.ArgumentParser()
152
  parser.add_argument("--cases", type=str, default=None)
153
+ parser.add_argument("--output", type=str, default="results/verity_pipeline_v0.4.jsonl")
154
  parser.add_argument("--batch-size", type=int, default=25, help="Print progress every N cases")
155
  parser.add_argument("--delay", type=float, default=0.5, help="Seconds between cases")
156
  parser.add_argument("--skip-calibration", action="store_true")