From c3f2930d4acba50268d4ca2225658c868c943558 Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Sat, 28 Jan 2023 02:20:53 -0600 Subject: [PATCH] Fix bug --- judge/ml/collab_filter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/judge/ml/collab_filter.py b/judge/ml/collab_filter.py index c68daa6..512c747 100644 --- a/judge/ml/collab_filter.py +++ b/judge/ml/collab_filter.py @@ -68,7 +68,7 @@ class CollabFilter: def problem_neighbors(self, problem, problemset, measure=DOT, limit=None): pid = problem.id if pid >= len(self.problem_embeddings): - return None + return [] scores = self.compute_scores( self.problem_embeddings[pid], self.problem_embeddings, measure )