Skip to content
This repository was archived by the owner on Nov 8, 2024. It is now read-only.

Commit 57e4606

Browse files
authored
Update the bandit example (#54)
1 parent d7a4a69 commit 57e4606

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

example/03_bandit.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,16 @@ async def bandit(name: str, country: str, age: int):
4646
eppo_client.bandit.Attributes(
4747
numeric_attributes={"age": age}, categorical_attributes={"country": country}
4848
),
49-
[
50-
eppo_client.bandit.ActionContext.create(
51-
"nike",
49+
{
50+
"nike": eppo_client.bandit.Attributes(
5251
numeric_attributes={"brand_affinity": 2.3},
5352
categorical_attributes={"aspect_ratio": "16:9"},
5453
),
55-
eppo_client.bandit.ActionContext.create(
56-
"adidas",
54+
"adidas": eppo_client.bandit.Attributes(
5755
numeric_attributes={"brand_affinity": 0.2},
5856
categorical_attributes={"aspect_ratio": "16:9"},
5957
),
60-
],
58+
},
6159
"control",
6260
)
6361

0 commit comments

Comments
 (0)