Partial eval-cache load appends regenerated batches to stale ones (ragged per-rank eval)
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 82/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- python
調査の方向性
angelspec/controller/eval.py の setup_eval から始めて、部分ロードの再生成パスを追跡し、その後 angelspec/training/trainer.py の cache_eval_samples を調べてください。再生成によって、新しい samples を追加する前に、部分的にロードされた eval shard がすべて破棄されることを確認し、すべての rank が古い batches のない一貫した cache を生成することを検証してください。
索引モデルが issue の本文から書いたものです。
説明
setup_eval loads the per-rank eval cache and regenerates it when any rank got nothing:
https://github.com/Tencent/AngelSpec/blob/main/angelspec/controller/eval.py#L195-L207
loaded = train_group.load_eval_cache(eval_cache_path)
if all(n > 0 for n in loaded):
eval_cache_loaded = True
...
else:
... # regenerate cache from inference
The cache save is fire-and-forget (async_save_eval_cache, one eval_rank_<r>.pt file per rank), so an interrupted previous run can leave a partial cache at the same dp_size: some ranks load n > 0, others 0. On the regeneration path, cache_eval_samples appends to whatever was loaded:
https://github.com/Tencent/AngelSpec/blob/main/angelspec/training/trainer.py#L363-L369
def cache_eval_samples(self, count: int) -> int:
for sample in itertools.islice(self._eval_data_fetcher, count):
...
self._eval_cache.append(cpu_sample)
Ranks that loaded stale shards end up with stale batches + freshly generated ones, so per-rank eval batch counts diverge. This is exactly the failure mode the comment at eval.py L182-L186 warns about ("ragged per-rank eval batch counts -> desynced FSDP all-gathers -> NCCL deadlock") — the dp_size cache key guards the cross-dp_size case but not the partial-save case at the same dp_size. Even without a deadlock, eval silently runs on a mix of stale and fresh hidden states.
Suggested fix: when the load is partial (regeneration path), explicitly clear every rank's loaded eval cache before regenerating, or have load_eval_cache roll back on partial loads.
- 主要言語
- Python
- スター
- 460
- フォーク
- 40
- 平均マージ
- 1時間 4分
- マージ済み PR(30日)
- 4
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Tencent/AngelSpec のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
Tencent/AngelSpec の issue をすべて見る
似ている issue
-
ui
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
accepted
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
future-agi/future-agi#5070 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
juandresrodca/AdminForge#69 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
deepset-ai/haystack-integrations#817 ·
メンテナーはふだん 12 日以内に返信
-
[Bug]: test_remote_realpath_uses_argument_vector fails on Windows with Python 3.13+ (ntpath.isabs)対応中かも @gouyu-hou が今日担当しました。 オープンtriage/confirmed
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
agentscope-ai/agentscope#4397 ·
メンテナーはふだん 2 日以内に返信