From 33f0dd9ece34ad52afadd7b212fd717b13bf54df Mon Sep 17 00:00:00 2001 From: AdrianSosic Date: Thu, 16 Jan 2025 11:49:21 +0100 Subject: [PATCH] Rename attribute of StreamingSequentialMetaRecommender --- baybe/recommenders/meta/sequential.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/baybe/recommenders/meta/sequential.py b/baybe/recommenders/meta/sequential.py index 8bbaf8669..ff86bd881 100644 --- a/baybe/recommenders/meta/sequential.py +++ b/baybe/recommenders/meta/sequential.py @@ -264,12 +264,12 @@ class StreamingSequentialMetaRecommender(BaseSequentialMetaRecommender): _last_recommender: RecommenderProtocol | None = field(init=False, default=None) """The recommender returned from the last call.""" - _step_of_last_recommender: int | None = field(init=False, default=None) + _position_of_latest_recommender: int | None = field(init=False, default=None) """The position of the latest recommender fetched from the iterable.""" @override def _get_recommender_at_current_step(self) -> RecommenderProtocol: - if self._step != self._step_of_last_recommender: + if self._step != self._position_of_latest_recommender: try: self._last_recommender = next(self._iterator) except StopIteration as ex: @@ -277,7 +277,7 @@ def _get_recommender_at_current_step(self) -> RecommenderProtocol: f"A total of {self._step+1} recommender(s) was/were requested but " f"the provided iterator provided only {self._step} element(s). " ) from ex - self._step_of_last_recommender = self._step + self._position_of_latest_recommender = self._step # By now, the first recommender has been fetched assert self._last_recommender is not None