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.2.0.tar.gz
(9.8 kB
view hashes)
Built Distribution
Close
Hashes for outplan-2.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa6f13afb275fc26a437b2dee5d4ebe31b57eabc21c6525ecd80542e62b1010b |
|
MD5 | d4d69478f23a5d9d42bbd2027d0e3e3c |
|
BLAKE2b-256 | 87414b5ef13a8452155bd8b5ff857dca961910b8e2a7158f08d1241f8d700ccf |