Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Commit

Permalink
warning on retrain
Browse files Browse the repository at this point in the history
  • Loading branch information
mdekstrand committed Nov 3, 2023
1 parent 64c85fc commit c9089f6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lenskit_implicit/implicit.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ def fit(self, ratings, **kwargs):
matrix, users, items = sparse_ratings(ratings, scipy=True)
uir = matrix.tocsr()
uir.data *= self.weight
if getattr(self.delegate, 'item_factors', None) is not None:
_logger.warn("implicit algorithm already trained, re-fit is usually a bug")

_logger.info('training %s on %s matrix (%d nnz)', self.delegate, uir.shape, uir.nnz)

Expand Down

0 comments on commit c9089f6

Please sign in to comment.