This repository was archived by the owner on Nov 8, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +9
-8
lines changed
Expand file tree Collapse file tree 4 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -339,7 +339,7 @@ def get_bandit_action_detail(
339339 subject_key ,
340340 subject_attributes ,
341341 action_contexts ,
342- bandit_data .model_data ,
342+ bandit_data .bandit_model_data ,
343343 )
344344
345345 # log bandit action
@@ -350,7 +350,7 @@ def get_bandit_action_detail(
350350 "action" : evaluation .action_key if evaluation else None ,
351351 "actionProbability" : evaluation .action_weight if evaluation else None ,
352352 "optimalityGap" : evaluation .optimality_gap if evaluation else None ,
353- "modelVersion" : bandit_data .model_version if evaluation else None ,
353+ "modelVersion" : bandit_data .bandit_model_version if evaluation else None ,
354354 "timestamp" : datetime .datetime .utcnow ().isoformat (),
355355 "subjectNumericAttributes" : (
356356 subject_attributes .numeric_attributes
Original file line number Diff line number Diff line change 11from datetime import datetime
22from enum import Enum
3+ from pydantic import Field
34from typing import Dict , List , Optional
45
56from eppo_client .base_model import SdkBaseModel
@@ -96,7 +97,7 @@ class BanditModelData(SdkBaseModel):
9697
9798class BanditData (SdkBaseModel ):
9899 bandit_key : str
99- model_name : str
100+ bandit_model_name : str = Field (alias = "modelName" )
101+ bandit_model_version : str = Field (alias = "modelVersion" )
102+ bandit_model_data : BanditModelData = Field (alias = "modelData" )
100103 updated_at : datetime
101- model_version : str
102- model_data : BanditModelData
Original file line number Diff line number Diff line change 1- __version__ = "3.3 .0"
1+ __version__ = "3.4 .0"
Original file line number Diff line number Diff line change @@ -175,9 +175,9 @@ def test_bandit_generic_test_cases(test_case):
175175 flag ,
176176 subject ["subjectKey" ],
177177 ContextAttributes (
178- numeric_attributes = subject ["subjectAttributes" ]["numeric_attributes " ],
178+ numeric_attributes = subject ["subjectAttributes" ]["numericAttributes " ],
179179 categorical_attributes = subject ["subjectAttributes" ][
180- "categorical_attributes "
180+ "categoricalAttributes "
181181 ],
182182 ),
183183 {
You can’t perform that action at this time.
0 commit comments