Skip to content

Commit

Permalink
Fix address arg for flwr-simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
chongshenng committed Nov 21, 2024
1 parent 60178f1 commit 1143263
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
7 changes: 5 additions & 2 deletions src/py/flwr/server/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,11 @@ def run_superlink() -> None:
io_address = (
f"{CLIENT_OCTET}:{_port}" if _octet == SERVER_OCTET else serverappio_address
)
address = simulationio_address if sim_exec else io_address
address = (
f"--simulationio-api-address {simulationio_address}"
if sim_exec
else f"--serverappio-api-address {io_address}"
)
cmd = "flwr-simulation" if sim_exec else "flwr-serverapp"

# Scheduler thread
Expand Down Expand Up @@ -446,7 +450,6 @@ def _flwr_scheduler(
command = [
cmd,
"--run-once",
"--serverappio-api-address",
io_api_address,
"--insecure",
]
Expand Down
12 changes: 9 additions & 3 deletions src/py/flwr/simulation/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@
get_project_dir,
unflatten_dict,
)
from flwr.common.constant import Status, SubStatus
from flwr.common.constant import (
SIMULATIONIO_API_DEFAULT_CLIENT_ADDRESS,
Status,
SubStatus,
)
from flwr.common.logger import (
log,
mirror_output_to_queue,
Expand Down Expand Up @@ -73,9 +77,11 @@ def flwr_simulation() -> None:
description="Run a Flower Simulation",
)
parser.add_argument(
"--superlink",
"--simulationio-api-address",
default=SIMULATIONIO_API_DEFAULT_CLIENT_ADDRESS,
type=str,
help="Address of SuperLink's SimulationIO API",
help="Address of SuperLink's SimulationIO API (IPv4, IPv6, or a domain name)."
f"By default, it is set to {SIMULATIONIO_API_DEFAULT_CLIENT_ADDRESS}.",
)
parser.add_argument(
"--run-once",
Expand Down

0 comments on commit 1143263

Please sign in to comment.