Skip to content

Commit

Permalink
Bugfix andreeaiana#3
Browse files Browse the repository at this point in the history
  • Loading branch information
Poseidondon committed Jun 11, 2024
1 parent 8caa65b commit 848a7bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion configs/data/rumind_rec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 1 addition & 5 deletions newsreclib/data/components/rec_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 848a7bb

Please sign in to comment.