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

Nan Representative Docs when loading a serialized model #1975

Open
felipeinagaki opened this issue May 6, 2024 · 1 comment
Open

Nan Representative Docs when loading a serialized model #1975

felipeinagaki opened this issue May 6, 2024 · 1 comment

Comments

@felipeinagaki
Copy link

Hi,
I've serialized my model using the command topic_model.save(folder_path, serialization="safetensors", save_ctfidf=True, save_embedding_model=model_name). But when I load the model with BERTopic.load(topic_model_path), the column 'Representative_Docs' is filled with NaN values. How can I recover or recompute them after loading the model?

Thanks in advance!

@MaartenGr
Copy link
Owner

Thanks for sharing your issue. That is currently not possible with public functions but you could use the private ._extract_representative_docs function instead to recalculate the representative documents. It would require you to have access to all documents though.

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

No branches or pull requests

2 participants