Skip to content

Commit

Permalink
fixed coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Daria Tikhonovich committed Oct 4, 2023
1 parent 2a8d7af commit cec82e0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rectools/models/implicit_als.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def _fit(self, dataset: Dataset) -> None: # type: ignore
self.verbose,
)

if self.use_gpu:
if self.use_gpu: # pragma: no cover
user_factors = implicit.gpu.Matrix(user_factors)
item_factors = implicit.gpu.Matrix(item_factors)

Expand Down Expand Up @@ -124,7 +124,7 @@ def get_users_vectors(model: AnyAlternatingLeastSquares) -> np.ndarray:
np.ndarray
User vectors
"""
if isinstance(model, GPUAlternatingLeastSquares):
if isinstance(model, GPUAlternatingLeastSquares): # pragma: no cover
return model.user_factors.to_numpy()
return model.user_factors

Expand All @@ -143,7 +143,7 @@ def get_items_vectors(model: AnyAlternatingLeastSquares) -> np.ndarray:
np.ndarray
Item vectors
"""
if isinstance(model, GPUAlternatingLeastSquares):
if isinstance(model, GPUAlternatingLeastSquares): # pragma: no cover
return model.item_factors.to_numpy()
return model.item_factors

Expand Down

0 comments on commit cec82e0

Please sign in to comment.