class tf_encrypted.config.LocalConfig(player_names, master=None, job_name='localhost', log_device_placement=False)[source]

Configure tf-encrypted to use threads on the local CPU to simulate the different players. Intended mostly for development/debugging use.

  • player_names ((str)) – List of players to be used in the session.
  • master (int,str) – Optional pointer to the master node. If int, denotes the index of the master’s name in the player_names. If str, denotes the player name.
  • 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) → LocalConfig[source]

Produces a LocalConfig 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.


Returns the config’s list of Player objects.

to_dict() → Dict[source]

Writes the config to a dictionary.