Greedy evaluation double-counts late verification results and can hang
評価
調査の方向性
BasicEvaluator の _recorder メソッドと、greedy_mode が設定されている場合に n - recorded_attempts を all_done に加算する最初の成功分岐から始めてください。issue のオフライン再現を実行します。問題は2つ、n=2、事前に読み込んだ結果キュー、StringIO 出力です。カウントが 4/4 のまま維持され、recorder が終了すれば完了です。その後、すでに成功した問題に対する後続の結果を無視するガードを追加し、回帰テストが通ることを確認してください。
索引モデルが issue の本文から書いたものです。
説明
Problem
With --greedy-mode and multiple attempts per problem, completed verification results can make the recorder's task count exceed its total and prevent evaluation from terminating.
Baseline: current master, c67e4213597b1477351d9ef5ca37fb622084cc78.
The first successful result adds n - recorded_attempts to all_done to account for that problem's skipped attempts. A generation/verification task may already be in flight when this happens: the worker checks success before the network/proof operation, not when it completes. Its completed result can therefore already be queued. The recorder does not repeat the greedy-success check and counts that result again.
Deterministic reproduction
No model or Lean server is needed to reproduce the recorder state. Instantiate BasicEvaluator with greedy_mode=True and n=2, create two EvaluationResult records, and preload its result queue with:
- Problem A: success.
- Problem A: another completed success or failure.
- Problem B: failure.
- Problem B: success.
Run the actual _recorder against this queue and a StringIO output. The initial all_tasks is 4; the resulting all_done is 5. Once the queue is empty, the recorder remains alive until explicitly interrupted because it only exits when all_done == all_tasks.
I reproduced both variants of the late A result. The same setup without greedy mode terminates normally and retains each attempted result.
Expected behavior and proposed fix
After the first success, ignore later results for that problem in the recorder while holding its existing lock. Those attempts have already been accounted for. In the example above, the count should remain 4/4, with one recorded attempt for A and two for B, and the recorder should terminate.
A minimal three-line guard and an offline regression are prepared. With the tests retained on unchanged master: 2 failed, 1 passed; with the guard: 3 passed. No mathematical formalization or proof-verification result is involved.
AI assistance: investigation and local reproduction used OpenAI Codex.
- 主要言語
- Lean
- スター
- 56
- フォーク
- 13
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
MoonshotAI/CombiBench のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 18/100
MoonshotAI/CombiBench#13 · コメント 1 件 ·
MoonshotAI/CombiBench の issue をすべて見る
似ている issue
-
00 - Bug component: numpy.linalg
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
-
Task select patterns with uppercase letters never match対応中かも @manobhisriram が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
MoonshotAI/kimi-code#5539 ·
メンテナーはふだん 1 日以内に返信