PreferredAI / cornac

A Comparative Framework for Multimodal Recommender Systems
https://cornac.preferred.ai
Apache License 2.0
845 stars 138 forks source link

Add metadata file when saving model #607

Closed tqtg closed 3 months ago

tqtg commented 3 months ago

Description

Having a metadata file saved with model is handy when we want to retrieve details about the model. One of such is the model classname.

Related Issues

Checklist:

darrylong commented 3 months ago

Thanks @tqtg. Do we want to include trainset information (if it exists) in the metadata as well?

tqtg commented 3 months ago

@darrylong what is the information in trainset that we want to store in metadata?

darrylong commented 3 months ago

@tqtg are there any unknown issues if we were to save it with a trainset, but load it without the trainset file? If yes, then we could add the trainset=true metadata for better error handling.

tqtg commented 3 months ago

@darrylong line 266, we do add trainset_file in the metadata file if it’s also saved. Besides, we try to make sure any models can make predictions without trainset available. It’s kind of a best practice for model implementation.