def init_taskd_agent(config : dict = {}, cls = None) -> bool

Description

Initializes TaskD Agent. This API is called in user code.

Input Parameters

Table 1 Input parameters

Parameter

Type

Description

config

dict:{str : str}

Agent information, including the Agent and network configurations.

The keys include:

  • Framework: Agent framework. Currently, PyTorch and MindSpore are supported.
  • UpstreamAddr: upstream network IP address
  • UpstreamPort: upstream network port
  • ServerRank: Agent rank ID

cls

Instance type

This parameter is used in the PyTorch framework and is a SimpleElasticAgent instance. It is not required for other frameworks.

Return Value

Table 2 Return value description

Type

Description

Bool

Whether initialization is successful.

  • True: succeeded
  • False: failed