File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -179,8 +179,16 @@ def bucket_to_entity_id(
179179 project_config .logger .info (message )
180180 decide_reasons .append (message )
181181
182+ traffic_allocations : list [TrafficAllocation ] = experiment .trafficAllocation
183+ if experiment .cmab :
184+ traffic_allocations = [
185+ {
186+ "entityId" : "$" ,
187+ "endOfRange" : experiment .cmab ['trafficAllocation' ]
188+ }
189+ ]
182190 # Bucket user if not in white-list and in group (if any)
183191 variation_id = self .find_bucket (project_config , bucketing_id ,
184- experiment .id , experiment . trafficAllocation )
192+ experiment .id , traffic_allocations )
185193
186194 return variation_id , decide_reasons
Original file line number Diff line number Diff line change @@ -487,7 +487,6 @@ def get_variation(
487487 # If so, handle CMAB-specific traffic allocation and decision logic.
488488 # Otherwise, proceed with standard bucketing logic for non-CMAB experiments.
489489 if experiment .cmab :
490- experiment .cmab
491490 cmab_decision_result = self ._get_decision_for_cmab_experiment (project_config ,
492491 experiment ,
493492 user_context ,
You can’t perform that action at this time.
0 commit comments