Skip to content

Commit

Permalink
Merge branch 'main' into feat/update-docker-compose-complete
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Steiner <[email protected]>
  • Loading branch information
Robert-Steiner committed Nov 4, 2024
2 parents 3564c7e + 4a99f08 commit b6e33c0
Show file tree
Hide file tree
Showing 38 changed files with 281 additions and 283 deletions.
2 changes: 1 addition & 1 deletion e2e/e2e-bare/e2e_bare/server_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def main(driver, context):
)

hist = fl.server.start_server(
server_address="0.0.0.0:8080",
server_address="127.0.0.1:8080",
config=fl.server.ServerConfig(num_rounds=3),
strategy=strategy,
)
Expand Down
2 changes: 1 addition & 1 deletion e2e/e2e-fastai/e2e_fastai/server_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def main(driver, context):
)

hist = fl.server.start_server(
server_address="0.0.0.0:8080",
server_address="127.0.0.1:8080",
config=fl.server.ServerConfig(num_rounds=3),
strategy=strategy,
)
Expand Down
2 changes: 1 addition & 1 deletion e2e/e2e-jax/e2e_jax/server_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def main(driver, context):
)

hist = fl.server.start_server(
server_address="0.0.0.0:8080",
server_address="127.0.0.1:8080",
config=fl.server.ServerConfig(num_rounds=3),
strategy=strategy,
)
Expand Down
2 changes: 1 addition & 1 deletion e2e/e2e-opacus/e2e_opacus/server_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def main(driver, context):
)

hist = fl.server.start_server(
server_address="0.0.0.0:8080",
server_address="127.0.0.1:8080",
config=fl.server.ServerConfig(num_rounds=3),
strategy=strategy,
)
Expand Down
2 changes: 1 addition & 1 deletion e2e/e2e-pandas/e2e_pandas/server_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def main(driver, context):

if __name__ == "__main__":
hist = fl.server.start_server(
server_address="0.0.0.0:8080",
server_address="127.0.0.1:8080",
config=fl.server.ServerConfig(num_rounds=1),
strategy=FedAnalytics(),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def main(driver, context):
)

hist = fl.server.start_server(
server_address="0.0.0.0:8080",
server_address="127.0.0.1:8080",
config=fl.server.ServerConfig(num_rounds=3),
strategy=strategy,
)
Expand Down
4 changes: 2 additions & 2 deletions e2e/e2e-pytorch/e2e_pytorch/server_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def main(driver, context):
)

hist = fl.server.start_server(
server_address="0.0.0.0:8080",
server_address="127.0.0.1:8080",
config=fl.server.ServerConfig(num_rounds=3),
strategy=strategy,
)
Expand All @@ -72,7 +72,7 @@ def main(driver, context):
)

if STATE_VAR in hist.metrics_distributed:
# The checks in record_state_metrics don't do anythinng if client's state has a single entry
# The checks in record_state_metrics don't do anything if client's state has a single entry
state_metrics_last_round = hist.metrics_distributed[STATE_VAR][-1]
assert (
len(state_metrics_last_round[1][0]) == 2 * state_metrics_last_round[0]
Expand Down
2 changes: 1 addition & 1 deletion e2e/e2e-pytorch/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def record_state_metrics(metrics: List[Tuple[int, Metrics]]) -> Metrics:
or (hist.losses_distributed[0][1] / hist.losses_distributed[-1][1]) >= 0.98
)

# The checks in record_state_metrics don't do anythinng if client's state has a single entry
# The checks in record_state_metrics don't do anything if client's state has a single entry
state_metrics_last_round = hist.metrics_distributed[STATE_VAR][-1]
assert (
len(state_metrics_last_round[1][0]) == 2 * state_metrics_last_round[0]
Expand Down
2 changes: 1 addition & 1 deletion e2e/e2e-scikit-learn/e2e_scikit_learn/client_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ def client_fn(context: Context):

if __name__ == "__main__":
# Start Flower client
start_client(server_address="0.0.0.0:8080", client=FlowerClient().to_client())
start_client(server_address="127.0.0.1:8080", client=FlowerClient().to_client())
2 changes: 1 addition & 1 deletion e2e/e2e-scikit-learn/e2e_scikit_learn/server_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def main(driver, context):
)

hist = fl.server.start_server(
server_address="0.0.0.0:8080",
server_address="127.0.0.1:8080",
config=fl.server.ServerConfig(num_rounds=3),
strategy=strategy,
)
Expand Down
2 changes: 1 addition & 1 deletion e2e/e2e-tensorflow/e2e_tensorflow/server_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def main(driver, context):
)

hist = fl.server.start_server(
server_address="0.0.0.0:8080",
server_address="127.0.0.1:8080",
config=fl.server.ServerConfig(num_rounds=3),
strategy=strategy,
)
Expand Down
4 changes: 0 additions & 4 deletions src/docker/complete/certs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ services:
IP.2 = $${SUPERLINK_IP}
EOF
ARG SUPEREXEC_IP=127.0.0.1
COPY --chmod=744 <<-'EOF' generate.sh
#!/bin/bash
# This script will generate all certificates if ca.crt does not exist
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import "flwr/proto/task.proto";
import "flwr/proto/run.proto";
import "flwr/proto/fab.proto";

service Driver {
service ServerAppIo {
// Request run_id
rpc CreateRun(CreateRunRequest) returns (CreateRunResponse) {}

Expand Down
3 changes: 1 addition & 2 deletions src/py/flwr/client/clientapp/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@

def flwr_clientapp() -> None:
"""Run process-isolated Flower ClientApp."""
log(INFO, "Starting Flower ClientApp")

parser = argparse.ArgumentParser(
description="Run a Flower ClientApp",
)
Expand All @@ -72,6 +70,7 @@ def flwr_clientapp() -> None:
)
args = parser.parse_args()

log(INFO, "Starting Flower ClientApp")
log(
DEBUG,
"Staring isolated `ClientApp` connected to SuperNode ClientAppIo at %s "
Expand Down
2 changes: 1 addition & 1 deletion src/py/flwr/common/constant.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
# SuperNode
CLIENTAPPIO_API_DEFAULT_ADDRESS = "0.0.0.0:9094"
# SuperLink
DRIVER_API_DEFAULT_ADDRESS = "0.0.0.0:9091"
SERVERAPPIO_API_DEFAULT_ADDRESS = "0.0.0.0:9091"
FLEET_API_GRPC_RERE_DEFAULT_ADDRESS = "0.0.0.0:9092"
FLEET_API_GRPC_BIDI_DEFAULT_ADDRESS = (
"[::]:8080" # IPv6 to keep start_server compatible
Expand Down
6 changes: 3 additions & 3 deletions src/py/flwr/common/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@

import grpc

from flwr.proto.driver_pb2_grpc import DriverStub # pylint: disable=E0611
from flwr.proto.log_pb2 import PushLogsRequest # pylint: disable=E0611
from flwr.proto.node_pb2 import Node # pylint: disable=E0611
from flwr.proto.serverappio_pb2_grpc import ServerAppIoStub # pylint: disable=E0611

from .constant import LOG_UPLOAD_INTERVAL

Expand Down Expand Up @@ -303,7 +303,7 @@ def restore_output() -> None:


def _log_uploader(
log_queue: Queue[Optional[str]], node_id: int, run_id: int, stub: DriverStub
log_queue: Queue[Optional[str]], node_id: int, run_id: int, stub: ServerAppIoStub
) -> None:
"""Upload logs to the SuperLink."""
exit_flag = False
Expand Down Expand Up @@ -346,7 +346,7 @@ def _log_uploader(


def start_log_uploader(
log_queue: Queue[Optional[str]], node_id: int, run_id: int, stub: DriverStub
log_queue: Queue[Optional[str]], node_id: int, run_id: int, stub: ServerAppIoStub
) -> threading.Thread:
"""Start the log uploader thread and return it."""
thread = threading.Thread(
Expand Down
6 changes: 0 additions & 6 deletions src/py/flwr/common/telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,6 @@ def _generate_next_value_(name: str, start: int, count: int, last_values: list[A

# Not yet implemented

# --- SuperExec --------------------------------------------------------------------

# SuperExec
RUN_SUPEREXEC_ENTER = auto()
RUN_SUPEREXEC_LEAVE = auto()

# --- Simulation Engine ------------------------------------------------------------

# CLI: flower-simulation
Expand Down
52 changes: 0 additions & 52 deletions src/py/flwr/proto/driver_pb2.py

This file was deleted.

52 changes: 52 additions & 0 deletions src/py/flwr/proto/serverappio_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
Loading

0 comments on commit b6e33c0

Please sign in to comment.