This commit is contained in:
cuom1999 2023-01-28 02:20:53 -06:00
parent e0ce058989
commit c3f2930d4a

View file

@ -68,7 +68,7 @@ class CollabFilter:
def problem_neighbors(self, problem, problemset, measure=DOT, limit=None): def problem_neighbors(self, problem, problemset, measure=DOT, limit=None):
pid = problem.id pid = problem.id
if pid >= len(self.problem_embeddings): if pid >= len(self.problem_embeddings):
return None return []
scores = self.compute_scores( scores = self.compute_scores(
self.problem_embeddings[pid], self.problem_embeddings, measure self.problem_embeddings[pid], self.problem_embeddings, measure
) )