RecTools
RecTools copied to clipboard
Save/load functions to all of the models
Feature Description
Support for saving and loading models in appropriate formats
Why this feature?
It' just super helpful in many cases
Additional context
No response
We plan to:
- Use numpy
npzformat for all applicalbe models for saving sparse and dense matrixes - Use https://numpy.org/doc/stable/reference/generated/numpy.savez_compressed.html or https://numpy.org/doc/stable/reference/generated/numpy.savez.html methods. @feldlime needs to research and confirm
- Model params are need to be acquired from
get_paramsmodel method and saved injsonformat - Models that don't have matrixes after fitting need their fitted data to be converted to np.array and then saved in
npz. Example: popular model - Torch models need to use torch native formats. This is not our priority for now
We need to (these are blockers):
- Implement
get_paramsmethod for all models (https://github.com/MobileTeleSystems/RecTools/issues/108) - Initialise models from dict of params (including wrapped model params). Implement a separate method for that. Interface needs to be discussed (https://github.com/MobileTeleSystems/RecTools/issues/157)
When saving model fitted data and models params we need to create an archive to make it one file. @feldlime creates full description for this task