Skip to content

Commit

Permalink
Merge branch 'replace-fwd-bwd-flowercontext' of https://github.com/ad…
Browse files Browse the repository at this point in the history
…ap/flower into replace-fwd-bwd-flowercontext
  • Loading branch information
panh99 committed Jan 27, 2024
2 parents ecee3ca + 1eadea6 commit 0e922e7
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 24 deletions.
2 changes: 1 addition & 1 deletion src/py/flwr/client/middleware/utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def make_mock_middleware(name: str, footprint: List[str]) -> Layer:

def middleware(message: Message, context: Context, app: FlowerCallable) -> Message:
footprint.append(name)
# add empty ConfigRegcord to in_message for this middleware layer
# add empty ConfigRecord to in_message for this middleware layer
message.message.set_configs(name=name, record=ConfigsRecord())
_increment_context_counter(context)
out_message: Message = app(message, context)
Expand Down
19 changes: 0 additions & 19 deletions src/py/flwr/client/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,13 @@
# ==============================================================================
"""Custom types for Flower clients."""

from dataclasses import dataclass
from typing import Callable

from flwr.common.context import Context
from flwr.common.message import Message
from flwr.proto.task_pb2 import TaskIns, TaskRes # pylint: disable=E0611

from .client import Client as Client


@dataclass
class Fwd:
"""."""

task_ins: TaskIns
context: Context


@dataclass
class Bwd:
"""."""

task_res: TaskRes
context: Context


FlowerCallable = Callable[[Message, Context], Message]
ClientFn = Callable[[str], Client]
Layer = Callable[[Message, Context, FlowerCallable], Message]
4 changes: 0 additions & 4 deletions src/py/flwr/flower/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@


from flwr.client.flower import Flower as Flower
from flwr.client.typing import Bwd as Bwd
from flwr.client.typing import Fwd as Fwd

__all__ = [
"Flower",
"Fwd",
"Bwd",
]

0 comments on commit 0e922e7

Please sign in to comment.