AssistantBench number scoring returns inf for the answer "-inf" and scores above 1 for negative golds
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 半日
- 初心者へのやさしさ
- 62/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- numpy, python
- 領域
- testing-qa
調査の方向性
The formula lives in distance_function_log in evaluate_numbers.py, reached through question_scorer in the AssistantBench evaluation package. Read the function first, then reproduce with the script in the issue. Done means guards for non-finite and opposite-sign or negative inputs keep scores in [0, 1], and the exact-score tests in tests/assistantbench/test_evaluation.py still pass.
索引モデルが issue の本文から書いたものです。
説明
distance_function_log in evaluate_numbers.py assumes pred and gold are positive. Two cases break that:
- The answer
-infparses as a float.np.log(gold / pred)is thenlog(-0.0), which is-inf, so the score is1 - (-inf) = inf. It is not clamped to 1. - With a negative gold,
pred > goldpicks the wrong ratio, so a much larger magnitude scores better than it should. Answer-5000against gold-5scores 7.9.
Scores are meant to be in [0, 1], so a single inf also makes a run's mean accuracy infinite.
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")
# load only the evaluation subpackage (the package __init__ needs a browser stack)
for name, path in [("ab", base), ("ab.evaluation", base + "/evaluation")]:
m = types.ModuleType(name); m.__path__ = [path]; sys.modules[name] = m
qs = importlib.import_module("ab.evaluation.evaluator").question_scorer
for pred, gold in [("-inf", "20"), ("-inf", "$55"), ("-5000", "-5")]:
print(f"pred={pred!r} gold={gold!r} score={qs(pred, gold)[0]}")
Expected: a score in [0, 1] for each pair.
Actual:
pred='-inf' gold='20' score=inf
pred='-inf' gold='$55' score=inf
pred='-5000' gold='-5' score=7.907755278982137
A fix should keep the original two branches of the formula and only add guards for non-finite values and for opposite-sign or negative inputs. Rewriting it as 1 - abs(log(pred / gold)) changes the last float bits and breaks the exact score comparisons in tests/assistantbench/test_evaluation.py.
Seen on 0a785fbed075 and still present on main at 27a90ce81509.
Related
#404 and #418 report other AssistantBench scoring problems (thousands separators in fix_number, and dict or mixed list answers crashing question_scorer). This issue is about distance_function_log itself, which assumes positive numbers, so it returns inf for the answer "-inf" and scores above 1 when the gold is negative.
- 主要言語
- Python
- スター
- 1.4k
- フォーク
- 202
- 平均マージ
- 6日 15時間
- マージ済み PR(30日)
- 3
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ServiceNow/BrowserGym のほかの issue
-
WebArena-Lite program_html evaluator navigates the agent's tab after every step対応中かも @JYunth が今日担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 78/100
ServiceNow/BrowserGym#425 ·
メンテナーはふだん 2 日以内に返信
-
SEED_MAX is `2 ^ 32` (XOR), so all random seeds fall in range(34)対応中かも @JYunth が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
ServiceNow/BrowserGym#424 ·
メンテナーはふだん 2 日以内に返信
-
AssistantBench: scoring a dict answer crashes on "{}" and on lists that mix dicts with other values対応中かも @damienen が 9 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
ServiceNow/BrowserGym#418 ·
メンテナーはふだん 2 日以内に返信
-
[Feature Proposal]: Add experiment lifecycle callbacks to `ExpArgs` in `loop.py`対応中かも @sriram687 が 14 日前に担当しました。 オープン
ServiceNow/BrowserGym#417 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
WebArena-Verified reward averages evaluator scores instead of using the benchmark's task score (partial credit for failed tasks)対応中かも @salma2vec が 18 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 32/100
ServiceNow/BrowserGym#412 ·
メンテナーはふだん 2 日以内に返信
ServiceNow/BrowserGym の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
SACGF/variantgrid#2791 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
bot-triaged oncall: cpu inductor
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
kubescape/cel-admission-library#141 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信