RUCAIBox / RecBole

A unified, comprehensive and efficient recommendation library
https://recbole.io/
MIT License
3.27k stars 590 forks source link

[💡SUG] Avoid running epochs for models that require no optimization. #2008

Open lukas-wegmeth opened 4 months ago

lukas-wegmeth commented 4 months ago

Is your feature request related to a problem? Please describe. Some models, e.g., ItemKNN and ADMMSLIM, require no "training" after initialization. That is, their forward functions are empty, and calculate_loss always returns 0. However, by setting epochs in the config, these models can be "trained" for many epochs, even though nothing will change in the model itself.

Describe the solution you'd like Printing a warning or ignoring the epochs config setting for these models would be helpful. This also makes it clear to the user that the model they train does not require update steps past initialization.

BishopLiu commented 4 months ago

@lukas-wegmeth Thanks for your suggestions! We will improve it in the next development plan.

lukas-wegmeth commented 3 months ago

@BishopLiu Thanks for considering my suggestion. Feel free to close this issue at will.