Skip to content

Commit

Permalink
fixed linters
Browse files Browse the repository at this point in the history
  • Loading branch information
feldlime committed Dec 7, 2024
1 parent 1cd5d54 commit 49aada9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rectools/models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class ModelBase(tp.Generic[ModelConfig_T]):
recommends_for_warm: tp.ClassVar[bool] = False
recommends_for_cold: tp.ClassVar[bool] = False

config_class: tp.ClassVar[tp.Type[ModelConfig_T]]
config_class: tp.Type[ModelConfig_T] # ClassVar cannot contain type variables

def __init__(self, *args: tp.Any, verbose: int = 0, **kwargs: tp.Any) -> None:
self.is_fitted = False
Expand Down
2 changes: 1 addition & 1 deletion rectools/models/implicit_als.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def __init__(self, model: AnyAlternatingLeastSquares, verbose: int = 0, fit_feat
self.fit_features_together = fit_features_together
self.use_gpu = isinstance(model, GPUAlternatingLeastSquares)
if not self.use_gpu:
self.n_threads = model.num_threads
self.n_threads = model.num_threads # type: ignore # TODO: remove when recommend n_threads implemented

@classmethod
def _make_config(
Expand Down
2 changes: 1 addition & 1 deletion rectools/models/lightfm.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def __init__(
self.model: LightFM
self._model = model
self.n_epochs = epochs
self.n_threads = num_threads
self.n_threads = num_threads # type: ignore # TODO: remove when recommend n_threads implemented

def _get_config(self) -> LightFMWrapperModelConfig:
inner_model = self._model
Expand Down

0 comments on commit 49aada9

Please sign in to comment.