Overview
Theupdate
method allows you to modify experiment configuration, including name, description, variants, traffic split, and metadata. Note that some fields may have restrictions based on the experiment’s current status.
Method Signature
Synchronous
Asynchronous
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
experiment_id | str | Yes | The unique identifier of the experiment |
name | str | No | New name for the experiment |
description | str | No | New description for the experiment |
variants | List[Dict] | No | Updated list of variants |
traffic_split | Dict[str, float] | No | Updated traffic distribution |
metadata | Dict[str, Any] | No | Updated metadata |
Returns
Returns a dictionary containing the updated experiment information.Examples
Basic Update
Update Multiple Fields
Update Metadata Only
Update Traffic Split
Partial Metadata Update
Asynchronous Update
Add New Variants (Draft Only)
Incremental Metadata Updates
Conditional Updates
Batch Updates
Asynchronous Batch Updates
Validation Before Update
Error Handling
Update Restrictions
Depending on experiment status, certain fields may be restricted:- Draft: All fields can be updated
- Running: Only metadata and description can be updated
- Paused: Metadata, description, and traffic split can be updated
- Completed: Only metadata can be updated
Best Practices
- Always validate updates before applying them
- Use incremental metadata updates to preserve existing data
- Check experiment status before attempting structural changes
- Use batch updates for efficiency when updating multiple experiments
- Include update reasons and timestamps in metadata
- Test traffic split changes carefully
Common Use Cases
- Updating experiment metadata with progress notes
- Adjusting traffic split during experiment runtime
- Adding context and documentation to experiments
- Correcting experiment names and descriptions
- Preparing experiments for launch
- Tracking experiment lifecycle changes