tf-encrypted / moose

Secure distributed dataflow framework for encrypted machine learning and data processing
Apache License 2.0
57 stars 15 forks source link

PyMoose: update `LocalMooseRuntime` interface to match `GrpcMooseRuntime` #1094

Closed mortendahl closed 2 years ago

mortendahl commented 2 years ago

Concretely, GrpcMooseRuntime takes the role assignment in the constructor instead of in evaluate_computation. So

storage_rep = { ... }

runtime_rep = LocalMooseRuntime(
  storage_mapping=storage_rep,
)

_ = runtime_rep.evaluate_computation(
  role_assignment={"alice": "alice", "bob": "bob", "carole": "carole"},
  ...
)

should become

storage_rep = { ... }

runtime_rep = LocalMooseRuntime(
  storage_mapping=storage_rep,
  role_assignment={"alice": "alice", "bob": "bob", "carole": "carole"},
)

_ = runtime_rep.evaluate_computation(
  ...
)