From 28156a9952da525cc19b27a2eec926f04cae5d92 Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Tue, 26 Mar 2024 20:23:47 -0500 Subject: [PATCH] Fix type --- 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 0bdafa8..105a534 100644 --- a/judge/ml/collab_filter.py +++ b/judge/ml/collab_filter.py @@ -71,7 +71,7 @@ class CollabFilter: def problem_neighbors(self, problem, problemset, measure=DOT, limit=None): pid = problem.id if pid not in self.problem_embeddings: - return None + return [] embedding = self.problem_embeddings[pid] scores = self.compute_scores(embedding, self.problem_embeddings, measure) res = []