Local workers fail for non-coroutine awaitable run results
Los mantenedores suelen responder en 3 días
Nadie ha tomado este issue todavía.
- #667 de @Elon-Jiang — cerrado sin fusionar
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 76/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- ai-infra-agents, backend
Línea de trabajo
Empieza en agentlightning/controller/local_reconciler.py, en _run_local_reconciler_worker, y revisa cómo gestiona los resultados de los métodos síncronos run(). Usa la reproducción de Deferred del issue y el punto de entrada del worker para comprobar el comportamiento. El trabajo estará terminado cuando los awaitables personalizados se completen correctamente y los resultados síncronos y de coroutine sigan funcionando.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 18.9k
- Forks
- 1.7k
- Merge medio
- 4 d 11 h
- PR fusionados (30 d)
- 9
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/agent-lightning
-
RayPPOTrainer._dump_generations() missing gts argument in _train_step callPosiblemente ocupada @yunkai-yyk la tomó hace 258 días. Abiertobug v0.x verl
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
microsoft/agent-lightning#492 ·
Los mantenedores suelen responder en 3 días
-
enhancement store v0.x
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
microsoft/agent-lightning#372 · 10 comentarios ·
Los mantenedores suelen responder en 3 días
-
Question: voluntary LLMSafe compatibility check for Agent Lightning rollout execution paths?Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 5/100
microsoft/agent-lightning#675 ·
Los mantenedores suelen responder en 3 días
-
[Bug]: post_with_retry retries deterministic 4xx responses for ~2.5 minutes before failingPosiblemente ocupada @feiiiiii5 la tomó hace 2 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 15/100
microsoft/agent-lightning#673 ·
Los mantenedores suelen responder en 3 días
-
[Bug]: server rejects a lowercase or mixed-case bearer auth scheme with a correct keyQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 58/100
microsoft/agent-lightning#671 ·
Los mantenedores suelen responder en 3 días
Todos los issues de microsoft/agent-lightning
Issues similares
-
New InternshipAbiertonew_internship
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
get_graph warns that the oneway column is missing when no way has a oneway tagPosiblemente ocupada @HTenkanen la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
cython/cython#8110 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
fix: security 🔐 style: article/section 📝 system: data-mgmt 🗃️ system: security 🔐 system: software 💻
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
uabrc/uabrc.github.io#1267 ·
-
Link Checker ReportAbiertoBot Type: Bug Type: Documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día