Local workers fail for non-coroutine awaitable run results
メンテナーはふだん 3 日以内に返信
まだ誰も着手していません。
- #667 @Elon-Jiang による — マージされずにクローズ
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 76/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- python
調査の方向性
agentlightning/controller/local_reconciler.py の _run_local_reconciler_worker から始め、同期 run() メソッドの結果をどのように処理するか確認してください。issue の Deferred の再現例と worker のエントリーポイントを使って動作を確認します。カスタム awaitable が正常に完了し、同期結果と coroutine の結果も引き続き動作すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Problem
On Python 3.12, the local worker detects results with inspect.isawaitable, but passes them directly to asyncio.run. That entry point requires a coroutine on Python 3.12. A valid custom awaitable returned by an agent's synchronous run() therefore fails with ValueError: a coroutine was expected and the worker exits with code 1 without completing the task. Synchronous results and normal coroutine results work.
Minimal reproduction
Put this in an importable module awaitable_agent.py:
import asyncio
class Deferred:
def __await__(self):
async def complete():
await asyncio.sleep(0)
print("completed")
return complete().__await__()
class Agent:
def run(self):
return Deferred()
Run the same worker entry point used by the local controller:
from agentlightning.controller.local_reconciler import _run_local_reconciler_worker
assert _run_local_reconciler_worker("awaitable_agent:Agent") == 0
On main 05c7fe133175653e48c990546a3509e52dc56512, the assertion fails; the worker prints the ValueError and returns 1. The awaitable is not executed.
A small coroutine wrapper can await the result before handing the wrapper to asyncio.run. I verified this with real importable agent classes and independent child processes: unchanged source exits 1 without the completion marker; the wrapper exits 0 with the marker. Regression controls cover synchronous and coroutine results. With the focused fix, all 159 CPU tests pass using the frozen dev/verl-cpu environment, whole-repository pyright reports 0 errors, and the lint, pre-commit, headers, strict docs and package checks pass. No browser, model inference, GPU training or cluster was used.
AI assistance: Codex investigated, prepared the fix and ran these checks.
- 主要言語
- Python
- スター
- 18.9k
- フォーク
- 1.7k
- 平均マージ
- 4日 11時間
- マージ済み PR(30日)
- 9
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/agent-lightning のほかの issue
-
RayPPOTrainer._dump_generations() missing gts argument in _train_step call対応中かも @yunkai-yyk が 257 日前に担当しました。 オープンbug v0.x verl
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
microsoft/agent-lightning#492 ·
メンテナーはふだん 3 日以内に返信
-
enhancement store v0.x
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
microsoft/agent-lightning#372 · コメント 10 件 ·
メンテナーはふだん 3 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 5/100
microsoft/agent-lightning#675 ·
メンテナーはふだん 3 日以内に返信
-
[Bug]: post_with_retry retries deterministic 4xx responses for ~2.5 minutes before failing対応中かも @feiiiiii5 が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 15/100
microsoft/agent-lightning#673 ·
メンテナーはふだん 3 日以内に返信
-
[Bug]: server rejects a lowercase or mixed-case bearer auth scheme with a correct key再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 58/100
microsoft/agent-lightning#671 ·
メンテナーはふだん 3 日以内に返信
microsoft/agent-lightning の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
aws/sagemaker-python-sdk#6554 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
huggingface/diffusers#15170 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] LLM conflict check ignores MNEMOSYNE_LLM_MAX_TOKENS, so reasoning models return empty repliesオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
mnemosyne-oss/mnemosyne#1325 ·
メンテナーはふだん 1 日以内に返信
-
enhancement meshtastic-2.8
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
pskillen/meshflow-api#459 ·