Skip to content

Commit

Permalink
fix(framework:skip) Fix Socket closed error in e2e tests (#4410)
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Steiner <[email protected]>
  • Loading branch information
Robert-Steiner authored Nov 2, 2024
1 parent 18e445d commit 4880d0a
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 12 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

0 comments on commit 4880d0a

Please sign in to comment.