Initially I had two buckets, “control group” and “treatment”. After running the experiment for a while (users got assigned to both buckets), I closed the “control group” bucket, and made the “treatment” bucket user allocation to 100%. However, I need to reassign all users who are in the “control group” bucket to the “treatment” bucket. How do I do that?
1 Answers
There is currently no way to do this easily.
The "just do it for all" method:
To assign all users to the same bucket, you can use this script on your assignments.csv (which can be downloaded via the UI):
for i in $( tail -n+2 assignments.csv | awk '{split($0,a,"\t");print a[2];}' ); do curl -X PUT -d '{"assignment": "NEW_BUCKET_NAME", "overwrite": true}' -H "Content-Type: application/json" http://HOST:PORT/api/v1/assignments/applications/APPNAME/experiments/EXPERIMENTLABEL/users/$i ; done
If you don't want the output to scroll around, you can add > output.log
to store it to a log or >/dev/null
to completely ignore it.
Note: there is no simple going back and depending on the number of assignments this will take a while. I will check if there are better methods, but I am not aware of any yet.
The "just do it when needed" method:
If you are able to change your production code, you can also just use the PUT assignment for each user individually when they come back to your website. Just use a PUT to:
http://HOST:PORT/api/v1/assignments/applications/APPLICATION/experiments/EXPERIMENT/users/USER
and make sure to send the header Content-Type: application/json
and as the body: {"assignment": "NEW_BUCKET_NAME", "overwrite": true}
.
(Since I am also one of the developers: I suggest you create an issue for this use case on the wasabi github repository, so we can easily track this issue and you can help us developing a solution for this problem.)

- 1,864
- 2
- 26
- 37