Experimentation: `srm_p_value` is null when default variant weights are 0, including on every final result after completion
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
Start by tracing how experiment result refreshes calculate srm_p_value while an experiment is running and after completion; the issue names no source files or tests. Compare both results against the split the experiment ran with, using the reproduction steps and arm counts as a guide. Done means the running and final results retain the SRM value for that split, or explain why it cannot be calculated.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
This looks related to draft PR #8798 ("Parked: fix(experimentation): test SRM against the rollout override's split"), which describes srm_p_value being null while an experiment runs. I could not find an issue for it, so I am filing one, and adding a second case that the approach in #8798 would not seem to cover.
- While running. Creating an experiment sets the flag's environment-default variant weights to 0. With those defaults,
results.payload.srm_p_valueisnull, with no warning, even with several hundred identities per variation. If the defaults are written back to the experiment's split after start, a value is returned. - After completion. Completing with a rollout decision rewrites the defaults (100/0 for a variant, 0/0 for control) and removes the experiment's rollout override. The final results then always have
srm_p_value: null, even when the defaults had been restored during the run and the running results had a value. The arm counts and chance-to-win values are otherwise unchanged between the last running snapshot and the final one.
Observed on self-hosted v2.295.2 (CI_COMMIT_SHA 5369ece3ff3aefbd021d2496f82a7ce0e9cd04d6), Postgres warehouse ({"warehouse_type": "postgres", "config": {"source": "flagsmith_database"}}).
Steps To Reproduce
All calls with an Organisation API key. One multivariate flag with control plus two variants (blue, green), one occurrence metric, events sent with the Python SDK 6.5.1 (get_identity_flags, track_exposure_event, track_event).
Case 1 (while running):
- Create the feature and its two
mv-options, thenPUT /api/v1/environments/{env}/featurestates/{id}/with both variants atpercentage_allocation: 33. Reading the feature state back gives 33 / 33. POST /api/v1/environments/{env}/experiments/withexperiment_rollout33 / 33 atrollout_percentage: 100. Reading the feature state back gives 0 / 0.POST .../experiments/{id}/start/. Still 0 / 0.- Send exposures for 300 identities, refresh results, read them:
srm_p_value: null(arm counts 117 / 99 / 84). - Repeat on a second experiment, but after step 3
PUTthe defaults back to 33 / 33:srm_p_value0.107 (arm counts 91 / 93 / 116).
Case 2 (after completion):
- As case 1 with the defaults restored to 33 / 33 after start, 300 identities, refresh:
srm_p_value0.933. POST .../experiments/{id}/complete/with{"rollout_decision": "variant", "rollout_variant": <blue option id>}. The defaults now read 100 / 0, andexperiment_rolloutisnull.- After the refresh limit,
POST .../results/refresh/, then read the results:is_final: true,srm_p_value: null. - The same with
{"rollout_decision": "control"}(defaults 0 / 0): running 0.812, finalnull.
I have a script that runs both cases end to end and can attach its output.
Expected behavior
srm_p_value is computed against the split the experiment actually ran with, both while running and on the final results. When it cannot be computed, the response or the UI says why, rather than returning null with no explanation. The docs describe the sample ratio mismatch warning as live, so a silent null reads as "no mismatch".
How are you running Flagsmith
- Self-hosted with Docker
- Ngôn ngữ chính
- Python
- Star
- 9.9k
- Fork
- 658
- Merge trung bình
- 1 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 168
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Flagsmith/flagsmith
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Flagsmith/flagsmith#9119 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Fix Button Alignment in SDK Installation SectionCó thể đã có người làm @manueldezman đã nhận 3 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Flagsmith/flagsmith#9056 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Cloud Python warehouse snippet omits the import needed by its short-lived-job guidanceCó thể đã có người làm @jcd1991 đã nhận 4 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
Flagsmith/flagsmith#9045 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Expose whether an organisation is blocked for API usageCó thể đã có người làm @PiUnknown đã nhận 38 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Flagsmith/flagsmith#8773 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
influx_query_manager doesn't catch ApiException, so Influx error responses 500Có thể đã có người làm @SAY-5 đã nhận 13 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Flagsmith/flagsmith#8510 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Flagsmith/flagsmith
Issue tương tự
-
ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
ARTPARK-SAHAI-ORG/calibrate-frontend#919 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
CI: MSYS2 jobs fail — mingw python3 package renamed upstream to pythonCó thể đã có người làm @ronaldtse đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
pydantic/pytest-examples#102 · 1 bình luận ·