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

Save and load LightFM model and schemas #1002

Merged
merged 8 commits into from
Feb 28, 2023

Conversation

edknv
Copy link
Contributor

@edknv edknv commented Feb 27, 2023

Partially addresses NVIDIA-Merlin/Merlin#825.

Goals ⚽

Enable LightFM to save and load the model and schemas.

Implementation Details 🚧

  • Adds save() that saves the LightFM object as a pickle. It also outputs input and output schemas along with the model.
  • Adds load() that can load the saved model and schema back into memory.

Testing Details 🔍

Added unit tests to tests/unit/lightfm/test_lightfm.py.

@github-actions
Copy link

Documentation preview

https://nvidia-merlin.github.io/models/review/pr-1002

@edknv edknv self-assigned this Feb 27, 2023
@edknv edknv added the enhancement New feature or request label Feb 27, 2023
@edknv edknv added this to the Merlin 23.03 milestone Feb 27, 2023
@edknv edknv changed the title Save LightFM schemas Save and load LightFM model and schemas Feb 27, 2023
@@ -26,7 +25,6 @@

def save_merlin_metadata(
export_path: Union[str, os.PathLike],
model: MerlinModel,
Copy link
Contributor Author

@edknv edknv Feb 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed because it looks like model is not used at all.

@edknv edknv marked this pull request as ready for review February 28, 2023 01:01
@edknv
Copy link
Contributor Author

edknv commented Feb 28, 2023

horovod (cpu) in the CI failed, but it is unrelated to this PR and should be fixed in a separate PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants