Skip to content

Commit

Permalink
Adding changes
Browse files Browse the repository at this point in the history
Signed-off-by: Agrawal, Kush <[email protected]>
  • Loading branch information
kagrawa2 committed Feb 21, 2025
1 parent 22f5288 commit 91594d3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions openfl/protocols/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# SPDX-License-Identifier: Apache-2.0

"""Proto utils."""

from openfl.protocols import base_pb2
from openfl.utilities import TensorKey

Expand Down Expand Up @@ -345,9 +346,11 @@ def proto_to_datastream(proto, logger, max_buffer_size=(2 * 1024 * 1024)):
yield reply
reply = None
chunk = None
del reply, chunk

del npbytes, npbytes_view


def get_headers(context) -> dict:
"""Get headers from context.
Expand Down
5 changes: 3 additions & 2 deletions openfl/transport/grpc/aggregator_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,9 @@ def send_local_task_results(
)

# convert (potentially) long list of tensors into stream
stream = []
stream += utils.proto_to_datastream(request, self.logger)
# stream = []
# stream += utils.proto_to_datastream(request, self.logger)
stream = utils.proto_to_datastream(request, self.logger)
response = self.stub.SendLocalTaskResults(iter(stream))

# also do other validation, like on the round_number
Expand Down

0 comments on commit 91594d3

Please sign in to comment.