Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing/unassigning/inactivating a leader from experiment with a running profile will end the profile #492

Open
kellytr opened this issue Apr 2, 2024 · 2 comments

Comments

@kellytr
Copy link
Contributor

kellytr commented Apr 2, 2024

No description provided.

@CamDavidsonPilon CamDavidsonPilon changed the title Removing/unassigning leader from experiment with a running profile will end the profile Removing/unassigning/inactivating a leader from experiment with a running profile will end the profile Apr 2, 2024
@CamDavidsonPilon
Copy link
Member

CamDavidsonPilon commented Apr 2, 2024

some notes:

  • When a leader runs a profile, the job is saved to it's local job DB with the metadata name="experiment_profile", job_source="user", experiment="<experiment>", unit="<leader>", pid=<number>.
  • When a unit:
    • goes inactive, the following runs: pio kill --all-jobs. This kills all jobs, expect those we deem "long-running"
    • gets unassigned, the following runs: pio kill --experiment <exp>, this kills all jobs tagged with experiment="<exp>".
    • gets removed: this can't happen to leader, so moot.
  1. What if we make experiment profile as "long running?" Inactive would not kill it, but unassigned would.
  2. What if we make experiment profile not associated to an experiment? This would create conflicts if multiple profiles want to run for different experiments. It's also not clear how to kill it (and only it) from the command line: pio kill --name experiment_profile would kill all profiles, and pio kill --name experiment_profile --experiment <exp> would kill nothing.

Probably something along the lines of 1. makes more sense. However, what does kill this profile? pio kill --name experiment_profile --experiment <exp>, or over MQTT (UI). How do we handle unassignment killing it?

@CamDavidsonPilon
Copy link
Member

Thinking more about this. How does one end an experiment profile? Either:

  1. It ends naturally
  2. The user stops it early from the /profiles page
  3. The experiment is ended (via the UI).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants