Support nested experiment/namespace base on Facebook Planout
Project description
outplan
Support nested experiment/namespace base on PlanOut
Install
pip install outplan
Usage
from outplan import NamespaceItem, ExperimentItem, GroupItem, ExperimentGroupClient
SimpleNamespace = NamespaceItem(
name="namespace_1",
bucket=10,
experiment_items=[
ExperimentItem(
name="exp_1",
bucket=10,
group_items=[
GroupItem(name="a", weight=0.5),
GroupItem(name="b", weight=0.5),
]
),
]
)
client = ExperimentGroupClient([SimpleNamespace])
print(client.get_group("namespace_1", unit="your_unit"))
# nested experiment/namespace is defined at `tests/test_experiment.py`
Dev
# run test
make test
# commit
pip install pre-commit
# and commit here
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
outplan-2.1.1.tar.gz
(12.6 kB
view hashes)