AssistantBench: scoring a dict answer crashes on "{}" and on lists that mix dicts with other values
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Python
- スター
- 1.4k
- フォーク
- 202
- 平均マージ
- 6日 15時間
- マージ済み PR(30日)
- 3
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ServiceNow/BrowserGym のほかの issue
-
難易度 3/5 半日 初心者へのやさしさ 62/100
ServiceNow/BrowserGym#420 ·
-
[Feature Proposal]: Add experiment lifecycle callbacks to `ExpArgs` in `loop.py`対応中かも @sriram687 が 9 日前に担当しました。 オープン
ServiceNow/BrowserGym#417 · 担当者 1 名 ·
-
WebArena-Verified reward averages evaluator scores instead of using the benchmark's task score (partial credit for failed tasks)対応中かも @salma2vec が 14 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 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 1対応中かも @Andiii208 が 35 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
ServiceNow/BrowserGym#404 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 28/100
ServiceNow/BrowserGym#401 ·
ServiceNow/BrowserGym の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
FinanceFlash/unvibecode#577 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area/test type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Clodmony/starship-coop#70 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
punitarani/fli#270 ·
-
🐛 Bug 🔔 Pending processing
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
jumpserver/jumpserver#17980 ·
メンテナーはふだん 1 日以内に返信
-
community enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信