Skip to content

Commit

Permalink
refactor(framework:skip) Rename directory variable in flwr run (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesbvll authored Jul 23, 2024
1 parent 3c1a154 commit 081da74
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/py/flwr/cli/run/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

# pylint: disable-next=too-many-locals
def run(
directory: Annotated[
app_dir: Annotated[
Path,
typer.Argument(help="Path of the Flower project to run"),
] = Path("."),
Expand All @@ -55,7 +55,7 @@ def run(
"""Run Flower project."""
typer.secho("Loading project configuration... ", fg=typer.colors.BLUE)

pyproject_path = directory / "pyproject.toml" if directory else None
pyproject_path = app_dir / "pyproject.toml" if app_dir else None
config, errors, warnings = load_and_validate(path=pyproject_path)

if config is None:
Expand Down Expand Up @@ -108,14 +108,14 @@ def run(
raise typer.Exit(code=1)

if "address" in federation:
_run_with_superexec(federation, directory, config_overrides)
_run_with_superexec(federation, app_dir, config_overrides)
else:
_run_without_superexec(directory, federation, federation_name, config_overrides)
_run_without_superexec(app_dir, federation, federation_name, config_overrides)


def _run_with_superexec(
federation: Dict[str, Any],
directory: Optional[Path],
app_dir: Optional[Path],
config_overrides: Optional[List[str]],
) -> None:

Expand Down Expand Up @@ -161,7 +161,7 @@ def on_channel_state_change(channel_connectivity: str) -> None:
channel.subscribe(on_channel_state_change)
stub = ExecStub(channel)

fab_path = build(directory)
fab_path = build(app_dir)

req = StartRunRequest(
fab_file=Path(fab_path).read_bytes(),
Expand Down

0 comments on commit 081da74

Please sign in to comment.