Skip to content

Commit

Permalink
Add BanditReferences to test data UFC response (#48)
Browse files Browse the repository at this point in the history
* new UFC for bandit references
  • Loading branch information
typotter authored Jul 30, 2024
1 parent 439c7a5 commit 4d3e92f
Showing 1 changed file with 226 additions and 144 deletions.
370 changes: 226 additions & 144 deletions ufc/bandit-flags-v1.json
Original file line number Diff line number Diff line change
@@ -1,158 +1,207 @@
{
"createdAt": "2024-04-17T19:40:53.716Z",
"environment": {
"name": "Test"
"name": "Test"
},
"flags": {
"non_bandit_flag": {
"key": "non_bandit_flag",
"enabled": true,
"variationType": "STRING",
"variations": {
"control": {"key": "control", "value": "control"},
"variant": {"key": "variant", "value": "variant"}
},
"allocations": [
{
"key": "control-allocation",
"splits": [
{
"variationKey": "control",
"shards": []
}
],
"doLog": true
}
],
"totalShards": 10000
},
"non_bandit_integer_flag": {
"key": "non_bandit_integer_flag",
"enabled": true,
"variationType": "INTEGER",
"variations": {
"control": {"key": "control", "value": 0},
"variant": {"key": "variant", "value": 1}
},
"allocations": [
{
"key": "control-allocation",
"splits": [
{
"variationKey": "control",
"shards": []
}
],
"doLog": true
}
],
"totalShards": 10000
},
"banner_bandit_flag": {
"key": "banner_bandit_flag",
"enabled": true,
"variationType": "STRING",
"variations": {
"control": {"key": "control", "value": "control"},
"banner_bandit": {"key": "banner_bandit", "value": "banner_bandit"}
"non_bandit_flag": {
"key": "non_bandit_flag",
"enabled": true,
"variationType": "STRING",
"variations": {
"control": {
"key": "control",
"value": "control"
},
"variant": {
"key": "variant",
"value": "variant"
}
},
"allocations": [
{
"key": "control-allocation",
"splits": [
{
"variationKey": "control",
"shards": []
}
],
"doLog": true
}
],
"totalShards": 10000
},
"allocations": [
{
"key": "analysis",
"splits": [
{
"variationKey": "control",
"shards": [
{
"salt": "traffic-banner-bandit-flag-1",
"ranges": [{"start": 0, "end": 2000}]
},
{
"salt": "split-banner-bandit-flag-1",
"ranges": [{"start": 0, "end": 5000}]
}
]
},
{
"variationKey": "banner_bandit",
"shards": [
{
"salt": "traffic-banner-bandit-flag-1",
"ranges": [{"start": 0, "end": 2000}]
},
{
"salt": "split-banner-bandit-flag-1",
"ranges": [{"start": 5000, "end": 10000}]
}
]
}
],
"doLog": false
"non_bandit_integer_flag": {
"key": "non_bandit_integer_flag",
"enabled": true,
"variationType": "INTEGER",
"variations": {
"control": {
"key": "control",
"value": 0
},
"variant": {
"key": "variant",
"value": 1
}
},
{
"key": "training",
"splits": [
{
"variationKey": "banner_bandit",
"shards": [
{
"salt": "traffic-banner-bandit-flag-2",
"ranges": [{"start": 0, "end": 8000}]
}
]
}
],
"doLog": true
}
],
"totalShards": 10000
},
"banner_bandit_flag_uk_only": {
"key": "banner_bandit_flag_uk_only",
"enabled": true,
"variationType": "STRING",
"variations": {
"control": {"key": "control", "value": "control"},
"banner_bandit": {"key": "banner_bandit", "value": "banner_bandit"}
"allocations": [
{
"key": "control-allocation",
"splits": [
{
"variationKey": "control",
"shards": []
}
],
"doLog": true
}
],
"totalShards": 10000
},
"allocations": [
{
"key": "training",
"rules": [
{
"conditions": [
"banner_bandit_flag": {
"key": "banner_bandit_flag",
"enabled": true,
"variationType": "STRING",
"variations": {
"control": {
"key": "control",
"value": "control"
},
"banner_bandit": {
"key": "banner_bandit",
"value": "banner_bandit"
}
},
"allocations": [
{
"key": "analysis",
"splits": [
{
"variationKey": "control",
"shards": [
{
"salt": "traffic-banner-bandit-flag-1",
"ranges": [
{
"start": 0,
"end": 2000
}
]
},
{
"salt": "split-banner-bandit-flag-1",
"ranges": [
{
"start": 0,
"end": 5000
}
]
}
]
},
{
"variationKey": "banner_bandit",
"shards": [
{
"salt": "traffic-banner-bandit-flag-1",
"ranges": [
{
"start": 0,
"end": 2000
}
]
},
{
"salt": "split-banner-bandit-flag-1",
"ranges": [
{
"start": 5000,
"end": 10000
}
]
}
]
}
],
"doLog": false
},
{
"key": "training",
"splits": [
{
"attribute": "country",
"operator": "ONE_OF",
"value": [
"UK"
]
"variationKey": "banner_bandit",
"shards": [
{
"salt": "traffic-banner-bandit-flag-2",
"ranges": [
{
"start": 0,
"end": 8000
}
]
}
]
}
]
}
],
"splits": [
{
"variationKey": "banner_bandit",
"shards": []
}
],
"doLog": true
],
"doLog": true
}
],
"totalShards": 10000
},
"banner_bandit_flag_uk_only": {
"key": "banner_bandit_flag_uk_only",
"enabled": true,
"variationType": "STRING",
"variations": {
"control": {
"key": "control",
"value": "control"
},
"banner_bandit": {
"key": "banner_bandit",
"value": "banner_bandit"
}
},
{
"key": "default",
"rules": [],
"splits": [
{
"variationKey": "control",
"shards": []
}
],
"doLog": true
}
],
"totalShards": 10000
}
"allocations": [
{
"key": "training",
"rules": [
{
"conditions": [
{
"attribute": "country",
"operator": "ONE_OF",
"value": [
"UK"
]
}
]
}
],
"splits": [
{
"variationKey": "banner_bandit",
"shards": []
}
],
"doLog": true
},
{
"key": "default",
"rules": [],
"splits": [
{
"variationKey": "control",
"shards": []
}
],
"doLog": true
}
],
"totalShards": 10000
}
},
"bandits": {
"banner_bandit": [
Expand All @@ -177,5 +226,38 @@
"variationValue": "cold_start_bandit"
}
]
},
"banditReferences": {
"banner_bandit": {
"flagVariations": [
{
"key": "banner_bandit",
"flagKey": "banner_bandit_flag",
"allocationKey": "banner_bandit_allocation",
"variationKey": "banner_bandit",
"variationValue": "banner_bandit"
},
{
"key": "banner_bandit",
"flagKey": "banner_bandit_flag_uk_only",
"allocationKey": "banner_bandit_uk_allocation",
"variationKey": "banner_bandit",
"variationValue": "banner_bandit"
}
],
"modelVersion": "v123"
},
"cold_start_bandit": {
"flagVariations": [
{
"key": "cold_start_bandit",
"flagKey": "cold_start_bandit_flag",
"allocationKey": "cold_start_bandit_allocation",
"variationKey": "cold_start_bandit",
"variationValue": "cold_start_bandit"
}
],
"modelVersion": "cold start"
}
}
}

0 comments on commit 4d3e92f

Please sign in to comment.