tf-encrypted / tf-encrypted

A Framework for Encrypted Machine Learning in TensorFlow

Home Page:https://tf-encrypted.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

import tf_encrypted in different files due to wrong Config setup

allenwoods opened this issue · comments

While adopting the mnist federated example, I extracted ModelOwner/DataOwner into another file (owner.py) and import tf_encrypted again. I got an error massage:

tensorflow.python.framework.errors_impl.InvalidArgumentError: Cannot assign a device for operation secure_aggregation/add/expand-seed/SecureSeededRandomUniform: {{node secure_aggregation/add/expand-seed/SecureSeededRandomUniform}}was explicitly assigned to /job:localhost/replica:0/task:0/device:CPU:0 but available devices are [ /job:tfe/replica:0/task:0/device:CPU:0, /job:tfe/replica:0/task:1/device:CPU:0, /job:tfe/replica:0/task:2/device:CPU:0, /job:tfe/replica:0/task:3/device:CPU:0, /job:tfe/replica:0/task:4/device:CPU:0, /job:tfe/replica:0/task:5/device:CPU:0, /job:tfe/replica:0/task:6/device:CPU:0 ]. Make sure the device specification refers to a valid device.
	 [[secure_aggregation/add/expand-seed/SecureSeededRandomUniform]]

Once I place import owner after setting up the config, the error will be gone. Any idea what causes this problem and how can I fix it? Thank you