Skip to content

Commit

Permalink
refactor(framework) Reorganize pyproject.toml and telemetry (#4098)
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljanes authored Aug 29, 2024
1 parent 1c01e7f commit 0ea6c51
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 16 deletions.
10 changes: 7 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,18 @@ exclude = [
]

[tool.poetry.scripts]
# `flwr` CLI
flwr = "flwr.cli.app:app"
flower-superlink = "flwr.server:run_superlink"
# SuperExec (can run with either Deployment Engine or Simulation Engine)
flower-superexec = "flwr.superexec:run_superexec"
# Simulation Engine
flower-simulation = "flwr.simulation.run_simulation:run_simulation_from_cli"
# Deployment Engine
flower-superlink = "flwr.server:run_superlink"
flower-supernode = "flwr.client:run_supernode"
flower-client-app = "flwr.client:run_client_app"
flower-server-app = "flwr.server:run_server_app"
flower-simulation = "flwr.simulation.run_simulation:run_simulation_from_cli"
flwr-clientapp = "flwr.client.clientapp:flwr_clientapp"
flower-client-app = "flwr.client:run_client_app" # Deprecated, use `flower-supernode`

[tool.poetry.dependencies]
python = "^3.8"
Expand Down
42 changes: 29 additions & 13 deletions src/py/flwr/common/telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,36 @@ def _generate_next_value_(name: str, start: int, count: int, last_values: List[A
# Ping
PING = auto()

# Client: start_client
# --- LEGACY FUNCTIONS -------------------------------------------------------------

# Legacy: `start_client` function
START_CLIENT_ENTER = auto()
START_CLIENT_LEAVE = auto()

# Server: start_server
# Legacy: `start_server` function
START_SERVER_ENTER = auto()
START_SERVER_LEAVE = auto()

# Legacy: `start_simulation` function
START_SIMULATION_ENTER = auto()
START_SIMULATION_LEAVE = auto()

# --- `flwr` CLI -------------------------------------------------------------------

# Not yet implemented

# --- SuperExec --------------------------------------------------------------------

# SuperExec
RUN_SUPEREXEC_ENTER = auto()
RUN_SUPEREXEC_LEAVE = auto()

# --- Simulation Engine ------------------------------------------------------------

# Not yet implemented

# --- Deployment Engine ------------------------------------------------------------

# Driver API
RUN_DRIVER_API_ENTER = auto()
RUN_DRIVER_API_LEAVE = auto()
Expand All @@ -152,10 +174,6 @@ def _generate_next_value_(name: str, start: int, count: int, last_values: List[A
RUN_SUPERLINK_ENTER = auto()
RUN_SUPERLINK_LEAVE = auto()

# Simulation
START_SIMULATION_ENTER = auto()
START_SIMULATION_LEAVE = auto()

# Driver: Driver
DRIVER_CONNECT = auto()
DRIVER_DISCONNECT = auto()
Expand All @@ -164,10 +182,6 @@ def _generate_next_value_(name: str, start: int, count: int, last_values: List[A
START_DRIVER_ENTER = auto()
START_DRIVER_LEAVE = auto()

# flower-client-app
RUN_CLIENT_APP_ENTER = auto()
RUN_CLIENT_APP_LEAVE = auto()

# flower-server-app
RUN_SERVER_APP_ENTER = auto()
RUN_SERVER_APP_LEAVE = auto()
Expand All @@ -176,9 +190,11 @@ def _generate_next_value_(name: str, start: int, count: int, last_values: List[A
RUN_SUPERNODE_ENTER = auto()
RUN_SUPERNODE_LEAVE = auto()

# SuperExec
RUN_SUPEREXEC_ENTER = auto()
RUN_SUPEREXEC_LEAVE = auto()
# --- DEPRECATED -------------------------------------------------------------------

# [DEPRECATED] CLI: `flower-client-app`
RUN_CLIENT_APP_ENTER = auto()
RUN_CLIENT_APP_LEAVE = auto()


# Use the ThreadPoolExecutor with max_workers=1 to have a queue
Expand Down

0 comments on commit 0ea6c51

Please sign in to comment.