mindspore.get_ps_context

View Source On AtomGit
mindspore.get_ps_context(attr_key)[source]

Get the parameter server training mode context attribute value according to the key. This API will be deprecated and removed in future versions.

Parameters

attr_key (str) –

The key of the attribute:

  • enable_ps (bool, optional): Whether to enable parameter server training mode. Default: False .

  • config_file_path (str, optional): Configuration file path used by recovery, parameter server training mode only supports Server disaster recovery currently. Default: '' .

  • enable_ssl (bool, optional): Set PS SSL mode enabled or disabled. Default: False . When set to False, users need to review and confirm the security of network environment where the distributed job is located.

Returns

Attribute value according to the key.

Raises

ValueError – If input key is not an attribute in parameter server training mode context.

Examples

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