Skip to content

Add metadata file when saving model#607

Merged
qtuantruong merged 3 commits intoPreferredAI:masterfrom
qtuantruong:save-model-metadata
Mar 28, 2024
Merged

Add metadata file when saving model#607
qtuantruong merged 3 commits intoPreferredAI:masterfrom
qtuantruong:save-model-metadata

Conversation

@qtuantruong
Copy link
Copy Markdown
Member

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:

  • I have added tests.
  • I have updated the documentation accordingly.
  • I have updated README.md (if you are adding a new model).
  • I have updated examples/README.md (if you are adding a new example).
  • I have updated datasets/README.md (if you are adding a new dataset).

@qtuantruong qtuantruong requested a review from darrylong March 26, 2024 18:39
@qtuantruong qtuantruong added the feature New feature/enhancement request label Mar 26, 2024
@darrylong
Copy link
Copy Markdown
Member

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

@qtuantruong
Copy link
Copy Markdown
Member Author

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

@darrylong
Copy link
Copy Markdown
Member

@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.

@qtuantruong
Copy link
Copy Markdown
Member Author

@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.

@qtuantruong qtuantruong merged commit c1f3383 into PreferredAI:master Mar 28, 2024
@qtuantruong qtuantruong deleted the save-model-metadata branch March 28, 2024 15:54
qtuantruong pushed a commit to qtuantruong/cornac that referenced this pull request Oct 25, 2025
qtuantruong added a commit to qtuantruong/cornac that referenced this pull request Oct 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature/enhancement request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants