зеркало из https://github.com/mozilla/taar.git
Add extended logging to collaborative_recommender.
This commit is contained in:
Родитель
21d1567e49
Коммит
ffa68096b1
|
@ -115,4 +115,10 @@ class CollaborativeRecommender(AbstractRecommender):
|
|||
sorted_dists = sorted(distances.items(),
|
||||
key=op.itemgetter(1),
|
||||
reverse=True)
|
||||
return [(s[0], s[1]) for s in sorted_dists[:limit]]
|
||||
recommendations = [(s[0], s[1]) for s in sorted_dists[:limit]]
|
||||
|
||||
log_data = (str([r[0] for r in recommendations]))
|
||||
logger.info("collaborative_recommender_triggered, "
|
||||
"guids: [%s]" % log_data)
|
||||
|
||||
return recommendations
|
||||
|
|
Загрузка…
Ссылка в новой задаче