mindspore.get_ps_context

mindspore.get_ps_context(attr_key)[source]

Get parameter server training mode context attribute value according to the key.

Parameters

attr_key (str) –

The key of the attribute:

  • enable_ps (bool): Whether to enable parameter server training mode.

  • config_file_path (string): Configuration file path used by recovery, parameter server training mode only supports Server disaster recovery currently. Default: ‘’.

  • scheduler_manage_port (int): Scheduler manage port used to scale out/in. Default: 11202.

  • enable_ssl (bool): Set PS SSL mode enabled or disabled. Default: False.

  • client_password (str): Password to decrypt the secret key stored in the client certificate. Default: ‘’.

  • server_password (str): Password to decrypt the secret key stored in the server certificate. Default: ‘’.

Returns

Returns attribute value according to the key.

Raises

ValueError – If input key is not attribute in auto parallel context.

Examples

>>> import mindspore as ms
>>> ms.get_ps_context("enable_ps")