__init__.py — 全异步策略的 Agent 循环子包初始化文件¶
文件路径: verl/experimental/fully_async_policy/agent_loop/__init__.py
文件概述¶
全异步策略的 Agent 循环子包初始化文件。导出核心类并触发 Agent 循环注册。
关键代码¶
from .agent_loop import FullyAsyncAgentLoopManager
from .partial_single_turn_agent_loop import PartialSingleTurnAgentLoop
from .partial_tool_agent_loop import AsyncPartialToolAgentLoop
_ = [PartialSingleTurnAgentLoop, AsyncPartialToolAgentLoop]
__all__ = [FullyAsyncAgentLoopManager]
FullyAsyncAgentLoopManager: 全异步版本的 Agent 循环管理器PartialSingleTurnAgentLoop: 注册为"partial_single_turn_agent",支持部分回滚的单轮 AgentAsyncPartialToolAgentLoop: 注册为"async_partial_tool_agent",支持部分回滚的工具调用 Agent
_ = [...] 确保两个 Agent 类被导入时执行 @register 装饰器完成注册。
小结¶
导出全异步专用的 Agent 循环管理器和两个支持部分回滚的 Agent 实现。