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:
- Run the command
flwr run to start the run.
- Once I want to stop the run, run the command
flwr list to get the list of current runs.
- In the list, copy the top Run ID.
- 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
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:
flwr runto start the run.flwr listto get the list of current runs.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
stopcommand. Specifically:flwr stop latestcould fetch the Run ID of the most recent run and stop it (equivalent to the process I described above).flwr stop allcould 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.run_idargument of thestop()function could take either anint(for a run ID) or astr(for a semantic parameter likelatestorall)._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