Skip to content

Commit 068df37

Browse files
Update graduation-related comments and print statements.
Change-Id: Ic5c222a74ee69603cbc7c09a4abd7e53b397f293
1 parent 96690af commit 068df37

1 file changed

Lines changed: 9 additions & 14 deletions

File tree

examples/experiments/evaluate_and_update_experiment.py

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -178,30 +178,25 @@ def evaluate_experiment(
178178
if click_p_value <= P_VALUE_THRESHOLD and click_lower_bound > 0:
179179
# We have a directional winner: high confidence in more traffic,
180180
# but not enough data to confirm conversion impact yet.
181-
print(
182-
f"Click volume is significantly up (+{click_lift*100:.1f}%). "
183-
"Graduating treatment for further manual analysis."
184-
)
185-
186-
# Graduate if it's a separate campaign test.
187-
# This keeps the high-volume treatment running independently.
188-
# Note that intra-campaign experiments (like ADOPT_BROAD_MATCH_KEYWORDS and
189-
# ADOPT_AI_MAX) run directly within the base campaign, meaning there is only
190-
# a single campaign involved and no separate treatment campaign to graduate.
191-
# Therefore, graduation is not supported for intra-campaign experiments.
181+
print(f"Click volume is significantly up (+{click_lift*100:.1f}%).")
182+
183+
# Graduation is only supported for separate campaign experiments, not
184+
# intra-campaign experiments where there is no separate treatment campaign.
192185
experiment_type_name = row.experiment.type_.name
193186
if (
194187
experiment_type_name != "ADOPT_BROAD_MATCH_KEYWORDS"
195188
and experiment_type_name != "ADOPT_AI_MAX"
196189
):
190+
print(
191+
"Graduating treatment campaign for further manual analysis."
192+
)
197193
graduate_experiment(
198194
client, customer_id, experiment_resource_name
199195
)
200196
else:
201197
print(
202-
"Intra-campaign trial detected: Graduation is not supported"
203-
" because there is only one campaign. Continuing to run to"
204-
" gather more conversion data."
198+
"Intra-campaign trial detected: graduation is not supported. "
199+
"Continuing to run the experiment to gather more conversion data."
205200
)
206201
return
207202

0 commit comments

Comments
 (0)