This commit is contained in:
cuom1999 2024-03-26 20:23:47 -05:00
parent 45469ff103
commit 28156a9952

View file

@ -71,7 +71,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 not in self.problem_embeddings: if pid not in self.problem_embeddings:
return None return []
embedding = self.problem_embeddings[pid] embedding = self.problem_embeddings[pid]
scores = self.compute_scores(embedding, self.problem_embeddings, measure) scores = self.compute_scores(embedding, self.problem_embeddings, measure)
res = [] res = []