diff --git a/pybandits/base.py b/pybandits/base.py index 53dcd5e..818599f 100644 --- a/pybandits/base.py +++ b/pybandits/base.py @@ -129,9 +129,9 @@ def _get_valid_actions(self, forbidden_actions: Optional[Set[ActionId]]) -> Set[ return valid_actions def _check_update_params( - self, - actions: List[ActionId], - rewards: List[Union[NonNegativeInt, List[NonNegativeInt]]], + self, + actions: List[ActionId], + rewards: List[Union[NonNegativeInt, List[NonNegativeInt]]], ): """ Verify that the given list of action IDs is a subset of the currently defined actions. @@ -152,11 +152,11 @@ def _check_update_params( @abstractmethod @validate_arguments def update( - self, - actions: List[ActionId], - rewards: List[Union[BinaryReward, List[BinaryReward]]], - *args, - **kwargs, + self, + actions: List[ActionId], + rewards: List[Union[BinaryReward, List[BinaryReward]]], + *args, + **kwargs, ): """ Update the stochastic multi-armed bandit model. @@ -190,14 +190,14 @@ def predict(self, forbidden_actions: Optional[Set[ActionId]] = None): def get_state(self) -> (str, dict): """ - Access the complete model internal state, enough to create an exact copy of the same model from it. - Returns - ------- - model_class_name: str - The name of the class of the model. - model_state: dict - The internal state of the model (actions, scores, etc.). - """ + Access the complete model internal state, enough to create an exact copy of the same model from it. + Returns + ------- + model_class_name: str + The name of the class of the model. + model_state: dict + The internal state of the model (actions, scores, etc.). + """ model_name = self.__class__.__name__ state: dict = self.dict() return model_name, state