Exemple #1
0
    def __init__(self, session_id, runtime_conf, host, port):
        super().__init__(session_id, runtime_conf)

        channel = grpc.insecure_channel(
            target=f"{host}:{port}",
            options=[('grpc.max_send_message_length', -1),
                     ('grpc.max_receive_message_length', -1)])
        self._stub = federation_pb2_grpc.TransferSubmitServiceStub(channel)
        self.__pool = ThreadPoolExecutor()

        # init object storage tables
        _fill_cache(self.all_parties, self.local_party, self._session_id)
Exemple #2
0
 def __init__(self, job_id, party_id, role, runtime_conf, host, port):
     self.trans_conf = file_utils.load_json_conf('federatedml/transfer_variable_conf/transfer_conf.json')
     self.job_id = job_id
     self.party_id = party_id
     self.role = role
     self.runtime_conf = runtime_conf
     self.channel = grpc.insecure_channel(
         target="{}:{}".format(host, port),
         options=[('grpc.max_send_message_length', -1), ('grpc.max_receive_message_length', -1)])
     self.stub = federation_pb2_grpc.TransferSubmitServiceStub(self.channel)
     self.__pool = concurrent.futures.ThreadPoolExecutor()
     FederationRuntime.instance = self