agentscope.rpc.rpc_config module

Configs for Distributed mode.

class agentscope.rpc.rpc_config.DistConf(host: str = 'localhost', port: int | None = None, max_pool_size: int = 8192, max_expire_time: int = 7200, max_timeout_seconds: int = 5, local_mode: bool = True, lazy_launch: bool = False)[源代码]

基类:dict

Distribution configuration for agents.

__init__(host: str = 'localhost', port: int | None = None, max_pool_size: int = 8192, max_expire_time: int = 7200, max_timeout_seconds: int = 5, local_mode: bool = True, lazy_launch: bool = False)[源代码]

Init the distributed configuration.

参数:
  • host (str, defaults to “localhost”) – Hostname of the rpc agent server.

  • port (int, defaults to None) – Port of the rpc agent server.

  • max_pool_size (int, defaults to 8192) – Max number of task results that the server can accommodate.

  • max_expire_time (int, defaults to 7200) – Max expire time of task results in seconds.

  • max_timeout_seconds (int, defaults to 5) – Max timeout seconds for rpc calls.

  • local_mode (bool, defaults to True) – Whether the started rpc server only listens to local requests.

  • lazy_launch (bool, defaults to False) – Deprecated.