#7945·flower

Allow "semantic parameters" for `flwr stop` (such as `flwr stop latest`)

Author: MeorgeCreated Aug 20, 2026Updated Aug 20, 2026

Type

Feature

Description

As I'm getting started with Flower and tinkering with my experiment setup, I find myself needing to stop and restart runs a lot. As-is, it seems the cycle goes like so:

  1. Run the command flwr run to start the run.
  2. Once I want to stop the run, run the command flwr list to get the list of current runs.
  3. In the list, copy the top Run ID.
  4. Run the command flwr stop [RUN_ID] to actually stop the run.

While I recognize it certainly won't be the case for everyone, I pretty much always only intend to have one run going at a time on my local machine, and I imagine there must be a fair number of other users who would be doing the same thing.

As such, I think it could be useful to add semantic parameters (I think that'd be an accurate term!) for the stop command. Specifically:

  • flwr stop latest could fetch the Run ID of the most recent run and stop it (equivalent to the process I described above).
  • flwr stop all could fetch Run IDs of all currently-running runs and stop them.

Planned Implementation

I am new to Flower's codebase, so I'd have to do a bit more studying and experimenting to make sure. But from looking at the code right now, I think this would just involve modifying flwr/cli/stop.py.

  • The run_id argument of the stop() function could take either an int (for a run ID) or a str (for a semantic parameter like latest or all).
  • If one of the semantic parameters is detected, before calling _stop_run() either the most recent run's ID could be found, or all active runs' IDs could be found and _stop_run() could be called on all of them in sequence.

Additional Context

No response