[Feature Proposal]: Add experiment lifecycle callbacks to `ExpArgs` in `loop.py`
@sriram687 がすでに取り組んでいます。
2026年10月27日 から。
評価
この issue はまだ評価されていません。
説明
Summary & Current Limitations
Currently, experiment execution in ExpArgs.run() operates as a closed, synchronous loop. While detailed step information (StepInfo) and summaries are recorded to disk and written to standard log files, there is no standardized event-driven mechanism to intercept what is happening while the experiment is actually running.
As a result:
- Blind Execution During Long Benchmarks: When evaluating an agent across hundreds of tasks (which can take hours or days), researchers only see flat, scrolling logger text. There is no native way to display clean live progress indicators, step latencies, or task completion rates in the console.
- No Budget & Safety Guardrails: Web agents querying commercial LLMs can occasionally encounter infinite action loops or repetitive failing actions. Without an execution hook, researchers cannot set runtime safety limits (such as aborting or truncating an episode if token count or estimated API spend exceeds a defined threshold).
- Disconnected from External Dashboards & UIs: Modern AI evaluation workflows rely on external tracking platforms and web dashboards. Because the execution loop does not emit lifecycle events, external tools cannot listen to agent progress in real time without monkey-patching core files.
The Proposed Concept: How Callbacks Solve This
A Callback System transforms the experiment loop from a passive black box into an active event broadcaster.
Instead of hardcoding specific logging tools into the loop, the loop simply notifies a list of listener objects at key lifecycle moments:
- When an experiment/task begins.
- When an observation is received.
- When an agent selects an action (along with latency and token info).
- When the environment steps and evaluates the action.
- When the experiment concludes (success, failure, or error).
How it Behaves:
- Zero Overhead & 100% Backward Compatible: By default, no callbacks are active. Existing scripts, tests, and pipelines continue running exactly as they do today with zero performance penalty.
- Fail-Safe Design: Any error occurring inside a user's monitoring callback is safely handled so that monitoring issues never crash or corrupt a running benchmark experiment.
- Pluggable & Extensible: Researchers choose only the callbacks they need for their specific environment.
What We Will Deliver
If the team is aligned with this direction, we propose delivering a clean, modular foundation:
-
Terminal-Level Experience:
- A built-in console progress callback that provides clean, single-line progress tracking (task progress, current step, step latency, and token count) without spamming the terminal with raw debug logs.
-
Safety & Budget Guardrails:
- A budget limit callback that monitors cumulative token consumption reported by the agent and safely stops runaway tasks if cost/token budgets are breached, protecting researchers from unexpected API bills.
-
Cloud & Web UI Bridge (Weights & Biases, MLflow, Custom UIs):
- A clean base callback interface that allows researchers to stream live BrowserGym events to cloud experiment trackers (like Weights & Biases or MLflow) or hook them directly into custom web dashboards (Streamlit, Gradio, or WebSocket frontends).
Maintainer Feedback
We would love to hear your thoughts on introducing this event-driven callback architecture to BrowserGym before opening a PR!
- 主要言語
- Python
- スター
- 1.4k
- フォーク
- 202
- 平均マージ
- 6日 15時間
- マージ済み PR(30日)
- 3
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ServiceNow/BrowserGym のほかの issue
-
WebArena-Verified reward averages evaluator scores instead of using the benchmark's task score (partial credit for failed tasks)対応中かも @salma2vec が 5 日前に担当しました。 オープン
難易度 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 が 27 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
ServiceNow/BrowserGym#404 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 28/100
ServiceNow/BrowserGym#401 ·
-
`miniwob.find-greatest` can be marked successful after selecting a non-maximum card対応中かも @jstar0 が 103 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
ServiceNow/BrowserGym#392 ·
-
Issues with the coordinates action space対応中かも @FazeelUsmani が 184 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
ServiceNow/BrowserGym#375 · コメント 2 件 ·
ServiceNow/BrowserGym の issue をすべて見る
似ている issue
-
area/profiles comp/cli P3 type/feature
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
NousResearch/hermes-agent#146372 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
[oblt-aw][autodoc] Document obs-aw-automerge contract and fix automerge doc inconsistencies対応中かも @github-actions が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
GeoSeries scale and skew tests fail with pytest 9.2.0対応中かも @jiayuasu が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
admission-deferred priority: medium status: ready work-class: scoped
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
melodic-software/claude-code-plugins#10887 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信