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
# install deps (once)
pip install -e .[test]
# 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-3.0.1.tar.gz
(14.9 kB
view details)
Built Distribution
outplan-3.0.1-py3-none-any.whl
(11.0 kB
view details)
File details
Details for the file outplan-3.0.1.tar.gz
.
File metadata
- Download URL: outplan-3.0.1.tar.gz
- Upload date:
- Size: 14.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d47fc0fa8d3e1d591c0db3ef18a01e6a3934674de90bc621abcb777583c74e7 |
|
MD5 | 23663b36b7d5d20a6c8c2c857d524ec3 |
|
BLAKE2b-256 | ee65177cb351d04a59f267e40812f9dededdf461c2ab5b9d8e4551cfcb824b7b |
File details
Details for the file outplan-3.0.1-py3-none-any.whl
.
File metadata
- Download URL: outplan-3.0.1-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86e1c9a73cfb1f2383a557a89689d4b5d4a96b4fce9db77a26b3370aeb416af0 |
|
MD5 | c617b4bd51f6756d6c15e75306b1c23f |
|
BLAKE2b-256 | 3a9165a4ce53067ff7525e6b4ec5dfe9d28dd75767ceb07615e9b3230497be12 |