-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include a cold start bandit test case #71
Changes from 2 commits
5fd53fc
778b456
8770481
083d0da
073d417
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -227,6 +227,31 @@ | |
} | ||
], | ||
"totalShards": 10000 | ||
}, | ||
"cold_start_bandit": { | ||
"key": "cold_start_bandit_flag", | ||
"enabled": true, | ||
"variationType": "STRING", | ||
"variations": { | ||
"cold_start_bandit": { | ||
"key": "cold_start_bandit", | ||
"value": "cold_start_bandit" | ||
} | ||
}, | ||
"allocations": [ | ||
{ | ||
"key": "all-traffic", | ||
"rules": [], | ||
"splits": [ | ||
{ | ||
"variationKey": "cold_start_bandit", | ||
"shards": [] | ||
} | ||
], | ||
"doLog": true | ||
} | ||
], | ||
"totalShards": 10000 | ||
} | ||
}, | ||
"bandits": { | ||
|
@@ -286,7 +311,7 @@ | |
"variationValue": "banner_bandit" | ||
} | ||
], | ||
"modelVersion": "v123" | ||
"modelVersion": "123" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removing the |
||
}, | ||
"car_bandit": { | ||
"flagVariations": [ | ||
|
@@ -298,7 +323,7 @@ | |
"variationValue": "car_bandit" | ||
} | ||
], | ||
"modelVersion": "v456" | ||
"modelVersion": "456" | ||
}, | ||
"cold_start_bandit": { | ||
"flagVariations": [ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
{ | ||
"flag": "cold_start_bandit_flag", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The new test case! We check all three variations |
||
"defaultValue": "default", | ||
"subjects": [ | ||
{ | ||
"subjectKey": "alice", | ||
"subjectAttributes": { | ||
"numericAttributes": {}, | ||
"categoricalAttributes": {} | ||
}, | ||
"actions": [ | ||
{ | ||
"actionKey": "red", | ||
"numericAttributes": {}, | ||
"categoricalAttributes": {} | ||
}, | ||
{ | ||
"actionKey": "blue", | ||
"numericAttributes": {}, | ||
"categoricalAttributes": {} | ||
}, | ||
{ | ||
"actionKey": "green", | ||
"numericAttributes": {}, | ||
"categoricalAttributes": {} | ||
} | ||
], | ||
"assignment": {"variation": "cold_start_bandit", "action": "red"} | ||
}, | ||
{ | ||
"subjectKey": "bob", | ||
"subjectAttributes": { | ||
"numericAttributes": {}, | ||
"categoricalAttributes": {} | ||
}, | ||
"actions": [ | ||
{ | ||
"actionKey": "red", | ||
"numericAttributes": {}, | ||
"categoricalAttributes": {} | ||
}, | ||
{ | ||
"actionKey": "blue", | ||
"numericAttributes": {}, | ||
"categoricalAttributes": {} | ||
}, | ||
{ | ||
"actionKey": "green", | ||
"numericAttributes": {}, | ||
"categoricalAttributes": {} | ||
} | ||
], | ||
"assignment": {"variation": "cold_start_bandit", "action": "green"} | ||
}, | ||
{ | ||
"subjectKey": "charles", | ||
"subjectAttributes": { | ||
"numericAttributes": {}, | ||
"categoricalAttributes": {} | ||
}, | ||
"actions": [ | ||
{ | ||
"actionKey": "red", | ||
"numericAttributes": {}, | ||
"categoricalAttributes": {} | ||
}, | ||
{ | ||
"actionKey": "blue", | ||
"numericAttributes": {}, | ||
"categoricalAttributes": {} | ||
}, | ||
{ | ||
"actionKey": "green", | ||
"numericAttributes": {}, | ||
"categoricalAttributes": {} | ||
} | ||
], | ||
"assignment": {"variation": "cold_start_bandit", "action": "blue"} | ||
} | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flag in the UFC so that we can request an assignment from the cold-started bandit