From b088f1f3d333a0d4c3f723f90172596a168b61b8 Mon Sep 17 00:00:00 2001 From: TayTroye Date: Fri, 22 Mar 2024 06:35:48 +0000 Subject: [PATCH] Format Python code according to PEP8 --- recbole/model/sequential_recommender/fearec.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recbole/model/sequential_recommender/fearec.py b/recbole/model/sequential_recommender/fearec.py index d44def528..125fc7e43 100644 --- a/recbole/model/sequential_recommender/fearec.py +++ b/recbole/model/sequential_recommender/fearec.py @@ -213,13 +213,13 @@ def calculate_loss(self, interaction): remaining_indices = targets_index.copy() while len(remaining_indices) > 0: sample_index = random.choice(remaining_indices) - remaining_indices = remaining_indices[remaining_indices != sample_index] + remaining_indices = remaining_indices[remaining_indices != sample_index] cur_item_list = interaction[self.ITEM_SEQ][i].to("cpu") sample_item_list = dataset.inter_feat[self.ITEM_SEQ][sample_index] are_equal = torch.equal(cur_item_list, sample_item_list) sample_item_length = dataset.inter_feat[self.ITEM_SEQ_LEN][sample_index] - - if not are_equal or len(remaining_indices) == 0: + + if not are_equal or len(remaining_indices) == 0: sem_pos_lengths.append(sample_item_length) sem_pos_seqs.append(sample_item_list) break