From 848a7bb84449f86a2935d9444b9b57d00b84000e Mon Sep 17 00:00:00 2001 From: Poseidondon Date: Tue, 11 Jun 2024 15:21:10 +0500 Subject: [PATCH] Bugfix #3 --- configs/data/rumind_rec.yaml | 2 +- newsreclib/data/components/rec_dataset.py | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/configs/data/rumind_rec.yaml b/configs/data/rumind_rec.yaml index e467f5a..c8f33eb 100644 --- a/configs/data/rumind_rec.yaml +++ b/configs/data/rumind_rec.yaml @@ -52,7 +52,7 @@ entity_conf_threshold: 0.5 sentiment_annotator: null -valid_time_split: "2024-05-29 22:32:51" # interactions with timestamp before this data will be used for training +valid_time_split: "2024-05-31 22:14:05" # interactions with timestamp before this data will be used for training # dataset settings neg_sampling_ratio: 4 diff --git a/newsreclib/data/components/rec_dataset.py b/newsreclib/data/components/rec_dataset.py index 0b17c5e..c45dec9 100644 --- a/newsreclib/data/components/rec_dataset.py +++ b/newsreclib/data/components/rec_dataset.py @@ -47,11 +47,7 @@ def __getitem__( candidates = np.array(bhv["candidates"]) labels = np.array(bhv["labels"]) - try: - candidates, labels = self._sample_candidates(candidates, labels) - except Exception: - print('Candidates:', candidates) - print('Labels:', labels) + candidates, labels = self._sample_candidates(candidates, labels) history = self.news.loc[history] candidates = self.news.loc[candidates]