Skip to content

Commit

Permalink
LINT
Browse files Browse the repository at this point in the history
Signed-off-by: Qing Wang <kingchin1218@gmail.com>
  • Loading branch information
jovany-wang committed Jul 4, 2023
1 parent c49f22e commit 4ec3360
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
1 change: 0 additions & 1 deletion benchmarks/many_tiny_tasks_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import ray
import time
import sys
import ray
import fed


Expand Down
14 changes: 9 additions & 5 deletions fed/proxy/barriers.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,10 @@ async def send_data_grpc(
)
# Waiting for the reply from downstream.
response = await stub.SendData(
request, metadata=fed_utils.dict2tuple(metadata), timeout=cluster_config.cross_silo_timeout)
request,
metadata=fed_utils.dict2tuple(metadata),
timeout=cluster_config.cross_silo_timeout,
)
logger.debug(
f'Received data response from seq_id {downstream_seq_id}, '
f'result: {response.result}.'
Expand Down Expand Up @@ -200,13 +203,14 @@ async def send(
dest_party_grpc_config = self.setup_grpc_config(dest_party)
try:
tls_enabled = fed_utils.tls_enabled(self._tls_config)
grpc_options =dest_party_grpc_config['grpc_options']
grpc_options = dest_party_grpc_config['grpc_options']
grpc_options = get_grpc_options(retry_policy=self.retry_policy) if \
grpc_options is None else fed_utils.dict2tuple(grpc_options)
grpc_options is None else fed_utils.dict2tuple(grpc_options)

if dest_party not in self._stubs:
if tls_enabled:
ca_cert, private_key, cert_chain = fed_utils.load_cert_config(self._tls_config)
ca_cert, private_key, cert_chain = fed_utils.load_cert_config(
self._tls_config)
credentials = grpc.ssl_channel_credentials(
certificate_chain=cert_chain,
private_key=private_key,
Expand Down

0 comments on commit 4ec3360

Please sign in to comment.