From 68bb16a533b44cd6f8197eabbeb7262a97348088 Mon Sep 17 00:00:00 2001 From: Sven Schmit Date: Mon, 10 Jun 2024 16:12:37 -0700 Subject: [PATCH] Update the bandit example --- example/03_bandit.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/example/03_bandit.py b/example/03_bandit.py index 2ce0f3f..eff8a07 100644 --- a/example/03_bandit.py +++ b/example/03_bandit.py @@ -46,18 +46,16 @@ async def bandit(name: str, country: str, age: int): eppo_client.bandit.Attributes( numeric_attributes={"age": age}, categorical_attributes={"country": country} ), - [ - eppo_client.bandit.ActionContext.create( - "nike", + { + "nike": eppo_client.bandit.Attributes( numeric_attributes={"brand_affinity": 2.3}, categorical_attributes={"aspect_ratio": "16:9"}, ), - eppo_client.bandit.ActionContext.create( - "adidas", + "adidas": eppo_client.bandit.Attributes( numeric_attributes={"brand_affinity": 0.2}, categorical_attributes={"aspect_ratio": "16:9"}, ), - ], + }, "control", )