Open dbalabka opened 1 year ago
Method _check_initialized() called on each prediction methods call. It checks that embeddings, biases, gradients and momentum are set while only embeddings and biases are used for predictions. Do we really require gradients and momentum for predictions? https://github.com/lyst/lightfm/blob/master/lightfm/lightfm.py#L262-L273 https://github.com/lyst/lightfm/blob/master/lightfm/lightfm.py#L259
_check_initialized()
IMO we can clean up momentums and gradients to minimize memory usage to use the model only for inference.
Method
_check_initialized()
called on each prediction methods call. It checks that embeddings, biases, gradients and momentum are set while only embeddings and biases are used for predictions. Do we really require gradients and momentum for predictions? https://github.com/lyst/lightfm/blob/master/lightfm/lightfm.py#L262-L273 https://github.com/lyst/lightfm/blob/master/lightfm/lightfm.py#L259IMO we can clean up momentums and gradients to minimize memory usage to use the model only for inference.