diff --git a/CHANGELOG.md b/CHANGELOG.md index cfecfdbe..6d618a5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Support `fit_partial()` for LightFM ([#223](https://github.com/MobileTeleSystems/RecTools/pull/223)) - LightFM Python 3.12+ support ([#224](https://github.com/MobileTeleSystems/RecTools/pull/224)) +### Fixed +- Fix Implicit ALS matrix zero assignment size ([#228](https://github.com/MobileTeleSystems/RecTools/pull/228)) + ### Removed - Python 3.8 support ([#222](https://github.com/MobileTeleSystems/RecTools/pull/222)) diff --git a/rectools/models/implicit_als.py b/rectools/models/implicit_als.py index 72753e11..ae74b17b 100644 --- a/rectools/models/implicit_als.py +++ b/rectools/models/implicit_als.py @@ -610,8 +610,8 @@ def _fit_combined_factors_on_gpu_inplace( model._item_norms_host = model._user_norms_host = None # pylint: disable=protected-access model._YtY = model._XtX = None # pylint: disable=protected-access - _YtY = implicit.gpu.Matrix.zeros(model.factors, model.factors) - _XtX = implicit.gpu.Matrix.zeros(model.factors, model.factors) + _YtY = implicit.gpu.Matrix.zeros(*item_factors.shape) + _XtX = implicit.gpu.Matrix.zeros(*user_factors.shape) for _ in tqdm(range(iterations), disable=verbose == 0):