From b4a7fe8b252e2daf297a2218884ae1cc4832441b Mon Sep 17 00:00:00 2001 From: olgavrou Date: Wed, 15 Nov 2023 20:48:41 -0500 Subject: [PATCH] fix notebook --- notebooks/news_recommendation.ipynb | 2 +- src/learn_to_pick/base.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/notebooks/news_recommendation.ipynb b/notebooks/news_recommendation.ipynb index c38e4c6..3000392 100644 --- a/notebooks/news_recommendation.ipynb +++ b/notebooks/news_recommendation.ipynb @@ -76,7 +76,7 @@ " chosen_article = picked[\"article\"]\n", " user = event.based_on[\"user\"]\n", " time_of_day = event.based_on[\"time_of_day\"]\n", - " score = self.get_score(user[0], time_of_day[0], chosen_article)\n", + " score = self.get_score(user, time_of_day, chosen_article)\n", " return score" ] }, diff --git a/src/learn_to_pick/base.py b/src/learn_to_pick/base.py index e1a85aa..28b86a9 100644 --- a/src/learn_to_pick/base.py +++ b/src/learn_to_pick/base.py @@ -470,8 +470,7 @@ def run(self, *args, **kwargs) -> Dict[str, Any]: ) except Exception as e: logger.info( - f"The selection scorer was not able to score, \ - and the chain was not able to adjust to this response, error: {e}" + f"The selection scorer was not able to score, and the chain was not able to adjust to this response, error: {e}" ) event = self._call_after_scoring_before_learning(score=score, event=event)