0

While training the model federated learning with keras on syft,to start workers on different system as client workers, particular line of command to be exectued on terminal.

python -m tf_encrypted.player --config /tmp/tfe.config client name

this command should be executed on system which is one of my client workers.when executing the code

(PySyft) C:\Users\mades>python -m tf_encrypted.player --config /tmp/tfe.config server1
Falling back to insecure randomness since the required custom op could not be found for the installed version of TensorFlow. Fix this by compiling custom ops. Missing file was 'C:\Users\mades\AppData\Roaming\Python\Python37\site-packages\tf_encrypted/operations/secure_random/secure_random_module_tf_1.15.2.so'
WARNING:tensorflow:From C:\Users\mades\AppData\Roaming\Python\Python37\site-packages\tf_encrypted\session.py:24: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.

Traceback (most recent call last):
  File "C:\Users\mades\Anaconda3\envs\PySyft\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\mades\Anaconda3\envs\PySyft\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\mades\AppData\Roaming\Python\Python37\site-packages\tf_encrypted\player\__main__.py", line 22, in <module>
    config = RemoteConfig.load(args.config)
  File "C:\Users\mades\AppData\Roaming\Python\Python37\site-packages\tf_encrypted\config.py", line 221, in load
    with open(filename, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tfe.config'

how to prepare the config file for federated learning on this system?

Eduardo Yáñez Parareda
  • 9,126
  • 4
  • 37
  • 50
maddy23
  • 138
  • 2
  • 13

1 Answers1

0

You don't need to create /tmp/tfe.config. It is automatically created when cluster is started. I mean when below command is executed.

cluster.start()

Let say your cluster is:

alice = sy.TFEWorker(host='192.168.1.120:4000', auto_managed=True)
bob = sy.TFEWorker(host='192.168.1.120:4001', auto_managed=True)
carol = sy.TFEWorker(host='192.168.1.120:4002', auto_managed=True)

cluster = sy.TFECluster(alice, bob, carol)
cluster.start()

A typical structure of /tmp/tfe.config is given below

{
"server0": "192.168.1.120:4000", 
"server1": "192.168.1.120:4001", 
"server2": "192.168.1.120:4002"
}

Now you may run below commands in three different sessions.

python -m tf_encrypted.player --config /tmp/tfe.config server0
python -m tf_encrypted.player --config /tmp/tfe.config server1
python -m tf_encrypted.player --config /tmp/tfe.config server2
I Bajwa PHD
  • 1,708
  • 1
  • 20
  • 42