RemoteConfig

class tf_encrypted.config.RemoteConfig(hostmap, master=None, job_name='tfe', log_device_placement=False)[source]

Configure tf-encrypted to use network hosts for the different players.

Parameters:
  • hostmap ((str,str),str->str) – A mapping of hostnames to their IP / domain.
  • master (int,str) – Optional pointer to the master node. If int, denotes the index of the master name in the hostmap (alphabetical if dict). If str, denotes the player name or node URI.
  • job_name (str) – The name of the job.
  • log_device_placement (bool) – Whether or not to write device placement in logs.
classmethod from_dict(params) → RemoteConfig[source]

Produces a RemoteConfig class from a dictionary.

Parameters:params (dict) – Key-value store of constructor arguments.
get_player(name) → Player[source]

Retrieve a specific Player object by name.

get_tf_config() → tf.ConfigProto, or str[source]

Extract the underlying tf.ConfigProto.

players

Returns the config’s list of Player objects.

server(name) → tf.train.Server[source]

Retrieves the tf.train.Server object from the RemoteConfig by the corresponding Player name.

Parameters:name (str) – Name of the server’s corresponding player.
to_dict() → Dict[source]

Writes the config to a dictionary.