Skip to content

Commit

Permalink
refactor(framework) Remove one argument from flower-superlink (#4706)
Browse files Browse the repository at this point in the history
  • Loading branch information
panh99 authored Dec 16, 2024
1 parent 3f8c541 commit c312858
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/py/flwr/server/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,13 @@


try:
from flwr.ee import get_exec_auth_plugins
from flwr.ee import add_ee_args_superlink, get_exec_auth_plugins
except ImportError:

# pylint: disable-next=unused-argument
def add_ee_args_superlink(parser: argparse.ArgumentParser) -> None:
"""Add EE-specific arguments to the parser."""

def get_exec_auth_plugins() -> dict[str, type[ExecAuthPlugin]]:
"""Return all Exec API authentication plugins."""
raise NotImplementedError("No authentication plugins are currently supported.")
Expand Down Expand Up @@ -580,7 +584,7 @@ def _try_setup_node_authentication(


def _try_obtain_user_auth_config(args: argparse.Namespace) -> Optional[dict[str, Any]]:
if args.user_auth_config is not None:
if getattr(args, "user_auth_config", None) is not None:
with open(args.user_auth_config, encoding="utf-8") as file:
config: dict[str, Any] = yaml.safe_load(file)
return config
Expand Down Expand Up @@ -703,6 +707,7 @@ def _parse_args_run_superlink() -> argparse.ArgumentParser:
)

_add_args_common(parser=parser)
add_ee_args_superlink(parser=parser)
_add_args_serverappio_api(parser=parser)
_add_args_fleet_api(parser=parser)
_add_args_exec_api(parser=parser)
Expand Down Expand Up @@ -792,12 +797,6 @@ def _add_args_common(parser: argparse.ArgumentParser) -> None:
type=str,
help="The SuperLink's public key (as a path str) to enable authentication.",
)
parser.add_argument(
"--user-auth-config",
help="The path to the user authentication configuration YAML file.",
type=str,
default=None,
)


def _add_args_serverappio_api(parser: argparse.ArgumentParser) -> None:
Expand Down

0 comments on commit c312858

Please sign in to comment.