Spaces:
Paused
Paused
Search commited on
Commit ·
e451a12
1
Parent(s): 8e1f2bc
auto: sync run_qwen_per_case_diagnostic_v2.py
Browse files
scripts/run_qwen_per_case_diagnostic_v2.py
CHANGED
|
@@ -70,7 +70,13 @@ def main():
|
|
| 70 |
enc = ov.tokenizer(c.prompt, truncation=True, max_length=160, return_tensors="pt")
|
| 71 |
b = {k:v.to(dev) for k,v in enc.items() if isinstance(v, torch.Tensor)}
|
| 72 |
ids = b["input_ids"][0].tolist()
|
| 73 |
-
sm = match_anchor_span(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
if sm is None:
|
| 75 |
row["err"] = "no_span_match"; rows.append(row); continue
|
| 76 |
with torch.no_grad():
|
|
|
|
| 70 |
enc = ov.tokenizer(c.prompt, truncation=True, max_length=160, return_tensors="pt")
|
| 71 |
b = {k:v.to(dev) for k,v in enc.items() if isinstance(v, torch.Tensor)}
|
| 72 |
ids = b["input_ids"][0].tolist()
|
| 73 |
+
sm = match_anchor_span(
|
| 74 |
+
text=c.prompt,
|
| 75 |
+
anchor_text=c.anchor_text,
|
| 76 |
+
input_ids=ids,
|
| 77 |
+
tokenizer=ov.tokenizer,
|
| 78 |
+
offsets=None,
|
| 79 |
+
)
|
| 80 |
if sm is None:
|
| 81 |
row["err"] = "no_span_match"; rows.append(row); continue
|
| 82 |
with torch.no_grad():
|