AssistantBench: scoring a dict answer crashes on "{}" and on lists that mix dicts with other values
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 35/100
Direzione di ricerca
The scorer lives in browsergym/assistantbench/src/browsergym/assistantbench/evaluation/evaluator.py, with the crashing paths in question_scorer, calc_recall and evaluate_dicts. Run the repro script from the issue against a checkout to see the three failing inputs. Pull request #419 is already open against this issue, so review it before starting. Done means all three answers return a score in [0, 1] without raising.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
question_scorer in the AssistantBench evaluator raises instead of returning a score when the gold answer is a dict and the prediction is {}, or a list whose first element is a dict but later elements are not. A model can emit either as its final answer, so validation of those tasks crashes.
Two causes:
calc_recallaverages an empty list for{}, which gives NaN, and the alignment step then raisesValueError.evaluate_dictsonly checks thatpred[0]is a dict, then calls.geton every element.
Repro
Needs numpy==2.1.3 scipy==1.14.1. Set SRC to a checkout of the repo.
import os, sys, types, importlib
src = os.environ.get("SRC", "src")
base = os.path.join(src, "browsergym/assistantbench/src/browsergym/assistantbench")
pkg = types.ModuleType("ab"); pkg.__path__ = [base]; sys.modules["ab"] = pkg
ev = importlib.import_module("ab.evaluation.evaluator")
gold = '{"sender": "USPS", "price (usd)": "41.75"}'
cases = ['{"sender": "USPS", "price (usd)": "41.75"}', '{}',
'[{"sender": "USPS", "price (usd)": "41.75"}, "maybe FedEx"]']
for p in cases:
try:
print("OK", p, "->", ev.question_scorer(p, gold))
except Exception as e:
print("CRASH", p, "->", type(e).__name__, e)
Expected: a score in [0, 1] for all three answers.
Actual:
OK {"sender": "USPS", "price (usd)": "41.75"} -> (np.float64(1.0), 1.0)
CRASH {} -> ValueError matrix contains invalid numeric entries
CRASH [{"sender": "USPS", "price (usd)": "41.75"}, "maybe FedEx"] -> AttributeError 'str' object has no attribute 'get'
Seen at 0a785fbed075 and still present on main at 27a90ce81509. I have a small fix ready and can open a PR.
- Lingua principale
- Python
- Stelle
- 1.4k
- Fork
- 202
- Merge medio
- 6g 15h
- PR unite (30g)
- 3
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ServiceNow/BrowserGym
-
Difficoltà 3/5 Mezza giornata Idoneità per principianti 62/100
ServiceNow/BrowserGym#420 ·
-
[Feature Proposal]: Add experiment lifecycle callbacks to `ExpArgs` in `loop.py`Forse già presa @sriram687 l’ha presa 6 giorni fa. Aperta
ServiceNow/BrowserGym#417 · 1 assegnatario ·
-
WebArena-Verified reward averages evaluator scores instead of using the benchmark's task score (partial credit for failed tasks)Forse già presa @salma2vec l’ha presa 10 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 32/100
ServiceNow/BrowserGym#412 ·
-
AssistantBench scorer treats a thousands separator as a decimal point: "3,080,000" scores 0 against gold 3080000, while "1,000" scores 1.0 against gold 1Forse già presa @Andiii208 l’ha presa 32 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
ServiceNow/BrowserGym#404 · 1 commento ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 28/100
ServiceNow/BrowserGym#401 ·
Tutte le issue di ServiceNow/BrowserGym
Issue simili
-
cost:cheap practicality:seen-in-the-wild severity:medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
fairagro/m4.2_advanced_middleware_api#620 ·
I maintainer di solito rispondono entro 1 giorno
-
area:security effort:S priority:P2 provider:local-libvirt status:ready type:docs
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
randomparity/kdive#3495 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
microsoft/markitdown#2820 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 2 giorni