Revert "[worker] fix: create a new event loop if none exists when building ro…"

This reverts commit e0e352b566f7ce6badd62dfe3cce3f52675e31a7.
This commit is contained in:
Chi Zhang
2025-10-19 08:50:34 +08:00
committed by GitHub
parent f209c6f656
commit 47e2a2b28e

View File

@ -630,7 +630,8 @@ class ActorRolloutRefWorker(Worker, DistProfilerExtension):
# For sync mode, we directly switch to trainer mode here.
# For async mode, we can't call run_until_complete here, so we will switch to trainer mode in AgentLoopManager.
if rollout_config.mode == "sync" and self._is_actor:
asyncio.run(self.trainer_mode())
loop = asyncio.get_event_loop()
loop.run_until_complete(self.trainer_mode())
async def rollout_mode(self):
"""Context switch hybridengine to rollout mode."""