Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

gather_trajectory_groups / gather_trajectories leave sibling rollouts running after a failure

Abierto Apto para principiantes
#1,144 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@salma2vec ya está trabajando en esto.

Desde el 22/10/2026.

  • #1145 de @salma2vec — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
78/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python
Área
backend

Línea de trabajo

Encuentra las implementaciones de gather_trajectory_groups y gather_trajectories y después lee cómo usan asyncio.gather y gestionan max_exceptions. Añade pruebas asíncronas específicas para un rollout que falla junto a otro rollout bloqueado en ambos puntos de entrada. El trabajo estará terminado cuando la ruta de excepción cancele los rollouts hermanos y espere a que finalicen, mientras que los fallos tolerados y la cancelación de la tarea que espera sigan comportándose como se describe.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

gather_trajectory_groups and gather_trajectories run their rollouts through asyncio.gather. When a rollout raises past max_exceptions, asyncio.gather re-raises that exception immediately, but it does not cancel the other awaitables, which keep running. The caller sees the failure and moves on (or the training step aborts), while the remaining rollouts keep calling the inference server, the environment and any after_each judge (e.g. RULER) with no owner. This is the same lifecycle gap as #1140, in the other gather entry points.

Reproduced on main at 5f0c1fb, Python 3.12, no model or service:

import asyncio
import art

async def main():
    entered, release = asyncio.Event(), asyncio.Event()
    effects = []

    async def slow_rollout():
        entered.set()
        await release.wait()
        effects.append("finished after gather raised")
        return art.TrajectoryGroup([art.Trajectory(reward=1)])

    async def failed_rollout():
        await entered.wait()
        raise RuntimeError("rollout failed")

    try:
        await art.gather_trajectory_groups([failed_rollout(), slow_rollout()], pbar_desc=None)
    except RuntimeError as error:
        print("gather raised:", error)
    release.set()
    await asyncio.sleep(0.1)
    print(effects)

asyncio.run(main())

Output:

gather raised: rollout failed
['finished after gather raised']

Expected: []. When the gather raises, the other rollouts should already be cancelled and awaited. gather_trajectories behaves the same way.

The tolerated-failure path (max_exceptions not exceeded) and cancellation of the awaiting task are fine today. asyncio.gather does propagate cancellation to its children; only the exception path leaks.

Lenguaje dominante
Python
Estrellas
10.8k
Forks
1k
Merge medio
12 h 33 min
PR fusionados (30 d)
126

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de OpenPipe/ART

Todos los issues de OpenPipe/ART

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.