Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add metadata file when saving model #607

Merged
merged 3 commits into from
Mar 28, 2024

Conversation

tqtg
Copy link
Member

@tqtg tqtg commented Mar 26, 2024

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

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

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

@tqtg
Copy link
Member Author

tqtg commented Mar 27, 2024

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

@darrylong
Copy link
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.

@tqtg
Copy link
Member Author

tqtg commented Mar 27, 2024

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

@tqtg tqtg merged commit c1f3383 into PreferredAI:master Mar 28, 2024
16 checks passed
@tqtg tqtg deleted the save-model-metadata branch March 28, 2024 15:54
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