ExperimentationMulti-armed bandits

Editing and archiving multi-armed bandits

Overview

This topic explains how to edit a multi-armed bandit (MAB) and archive it when you no longer need it.

Edit multi-armed bandits

You can make changes to the name, goal, randomization unit, metrics, and audience of an existing MAB. Changing the audience of a running MAB requires you to stop the MAB, update the audience, and then start a new iteration.

After you create a MAB, you cannot edit its flag or the flag’s variations. If you want to use a different flag or a different flag variation, you must create a new MAB.

Change multi-armed bandit settings

You can change a MAB’s name and goal at any time without affecting the results of the MAB.

If you want to begin measuring a completely different randomization unit or metric as part of a MAB, we recommend creating a new MAB instead of editing an existing one. If you want to use a similar metric, you can change the metric associated with a MAB.

To change a MAB’s name, goal, metric, or randomization unit:

  1. Navigate to the Design tab of your MAB.
  2. Click Edit design.
  3. Edit the Name or Goal as needed.
  4. Choose new Metrics as needed.
  5. Choose a new randomization unit from the Randomize by menu as needed.
  6. Scroll to the top of the page and click Save.
    • If the MAB was running when you made edits, a “Save multi-armed bandit design?” dialog appears. Enter a reason for the change and click Save & start new iteration.

Change multi-armed bandit audiences

To edit the audience of a MAB, you must stop the MAB iteration, make the audience update, and start a new iteration. This lets you select a flag variation to serve to any contexts that will no longer be included in the MAB.

To edit the audience of a MAB:

  1. Navigate to the Design tab of your MAB.
  2. Click Stop. The “Stop multi-armed bandit” dialog appears.
  3. Select a variation to serve while the MAB is stopped.
  4. Enter a Reason for stopping.
  5. Click Stop multi-armed bandit.
  6. Click Edit design.
  7. Navigate to the “Audience targeting” section and update the Experiment audience as needed.
    • You can also update the Sample size if you need to change the percentage of contexts to serve the MAB to.

The "Audience targeting" section of a MAB.

The "Audience targeting" section of a MAB.
  1. Scroll to the top of the page and click Save.
  2. Click Start to start a new iteration of the MAB.

Archive and restore multi-armed bandits

You can archive MABs that have concluded, as well as the flags and metrics attached to them, but you cannot permanently delete MABs. Archiving MABs preserves the results so you can refer to them in the future.

Before you can archive a MAB:

LaunchDarkly hides archived MABs from the Multi-armed bandits list. You cannot start new iterations for archived MABs.

When you archive or restore a MAB, LaunchDarkly sends the maintainer and anyone following the MAB an email, an in-app notification, and, if you have the Slack app integration configured, a Slack notification.

Archive multi-armed bandits

To archive a MAB:

  1. Navigate to the Multi-armed bandits list in the environment where you want to archive a MAB.
  2. Click on the three-dot overflow menu of the MAB you want to archive.
  3. Select Archive.

To view archived MABs on the Multi-armed bandits list, click Filters and select Yes in the “Archived” section.

To switch back to viewing active MABs, click View and select No in the “Archived” section.

Restore multi-armed bandits

To restore a MAB, navigate to the MAB Design tab and click restore this multi-armed bandit.

Multi-armed bandit settings are environment-specific

MABs and MAB settings are specific to single environments. If you want to run the same MAB in different environments, you must create and run the MAB in each environment individually.

You can also use the REST API: Patch experiment