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

Fix #2020 #2112

Merged
merged 2 commits into from
Aug 10, 2024
Merged

Fix #2020 #2112

merged 2 commits into from
Aug 10, 2024

Conversation

sete39
Copy link
Contributor

@sete39 sete39 commented Aug 4, 2024

What does this PR do?

Fixes #2020

This fix displays a warning if the c-TF-IDF is None when saving the model with save_ctfidf=True. This occurs when merging BERTopic models. Before this fix, this would cause a crash as discussed in the issue.

This is my first contribution so please do let me know if I did something wrong or if there any changes required!

Before submitting

  • This PR fixes a typo or improves the docs (if yes, ignore all other checks!).
  • Did you read the contributor guideline?
  • Was this discussed/approved via a Github issue? Please add a link to it if that's the case.
  • Did you make sure to update the documentation with your changes (if applicable)?
  • Did you write any new necessary tests?

Copy link
Owner

@MaartenGr MaartenGr left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! I left a small comment regarding the return statement.

bertopic/_bertopic.py Outdated Show resolved Hide resolved
@MaartenGr
Copy link
Owner

It all looks good to me, thank you for the work on this!

@MaartenGr MaartenGr merged commit 510c15e into MaartenGr:master Aug 10, 2024
6 checks passed
@sete39 sete39 deleted the fix_2020 branch August 10, 2024 11:55
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

Successfully merging this pull request may close these issues.

c_tf_idf_.indptr is None when attempting to save merged model
3 participants