RemoteConfig

class tf_encrypted.config.RemoteConfig(hostmap, job_name='tfe')[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.
  • job_name (str) – The name of the job.
get_player(name_or_player)[source]

Retrieve a specific Player object by name.

For convenience it is also possible to pass in an existing Player object, which will simply be returned as-is if the player is known already.

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

Extract the underlying tf.ConfigProto.

static load(filename)[source]

Constructs a RemoteConfig object from a JSON hostmap file.

Parameters:filename (str) – Name of file to load from.
players

Returns the config’s list of Player objects.

save(filename)[source]

Saves the configuration as a JSON hostmap file.

Parameters:filename (str) – Name of file to save to.
server(name, start=True)[source]

Construct a tf.train.Server object for the corresponding Player.

Parameters:name (str) – Name of player.