Skip to content

Commit

Permalink
Merge pull request #1863 from ChenglongMa/fix-negative-sampling-bug
Browse files Browse the repository at this point in the history
[🐛Bug] Fix `if` condition in `set_neg_sample_args` function
  • Loading branch information
Ethan-TZ authored Oct 8, 2023
2 parents 6d9f742 + dae9b5f commit 00c018e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions recbole/data/dataloader/abstract_dataloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ def _set_neg_sample_args(self, config, dataset, dl_format, neg_sample_args):
self.neg_sample_args = neg_sample_args
self.times = 1
if (
self.neg_sample_args["distribution"] == "uniform"
or self.neg_sample_args["distribution"] == "popularity"
) and self.neg_sample_args["sample_num"] != "none":
self.neg_sample_args["distribution"] in ["uniform", "popularity"]
and self.neg_sample_args["sample_num"] != "none"
):
self.neg_sample_num = self.neg_sample_args["sample_num"]

if self.dl_format == InputType.POINTWISE:
Expand Down

0 comments on commit 00c018e

Please sign in to comment.