Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
jafermarq committed Jul 12, 2024
1 parent 11a79d6 commit e5ee52b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
3 changes: 1 addition & 2 deletions src/py/flwr/client/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,7 @@ def _start_client_internal(
server runs on the same machine on port 8080, then `server_address`
would be `"[::]:8080"`.
node_config: Dict[str, str]
The configuration of the node, it must contain at least a `num-partitions`
and a `partition-id` key.
The configuration of the node.
load_client_app_fn : Optional[Callable[[], ClientApp]] (default: None)
A function that can be used to load a `ClientApp` instance.
client_fn : Optional[ClientFnExt]
Expand Down
6 changes: 3 additions & 3 deletions src/py/flwr/client/supernode/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,9 @@ def _parse_args_common(parser: argparse.ArgumentParser) -> None:
parser.add_argument(
"--node-config",
type=int,
help="A comma separated list of key/value pairs (separated by `=`) to configure "
"the SuperNode. "
"E.g, `--node-config key1='value1',partition-id=0,num-partitions=100`",
help="A comma separated list of key/value pairs (separated by `=`) to "
"configure the SuperNode. "
"E.g, `--node-config key1=\"value1\",partition-id=0,num-partitions=100`",
)


Expand Down
6 changes: 3 additions & 3 deletions src/py/flwr/common/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,16 +121,16 @@ def flatten_dict(raw_dict: Dict[str, Any], parent_key: str = "") -> Dict[str, st


def parse_config_args(
config_overrides: Optional[str],
config: Optional[str],
separator: str = ",",
) -> Dict[str, str]:
"""Parse separator separated list of key-value pairs separated by '='."""
overrides: Dict[str, str] = {}

if config_overrides is None:
if config is None:
return overrides

overrides_list = config_overrides.split(separator)
overrides_list = config.split(separator)
if (
len(overrides_list) == 1
and "=" not in overrides_list
Expand Down

0 comments on commit e5ee52b

Please sign in to comment.