Fix topic_sizes_ not updated in zero-shot topic modeling (#2384)#2417
Open
ck37 wants to merge 1 commit intoMaartenGr:masterfrom
Open
Fix topic_sizes_ not updated in zero-shot topic modeling (#2384)#2417ck37 wants to merge 1 commit intoMaartenGr:masterfrom
ck37 wants to merge 1 commit intoMaartenGr:masterfrom
Conversation
97e4d13 to
fec0041
Compare
fec0041 to
07b4428
Compare
Owner
|
Thank you for the PR! With respect to the tests, can you explain a bit more on why those were added like this? Specifically, I'm seeing UMAP parameters sometimes being added whilst that is not the case for every test. Moreover, there are several calls to BERTopic, which can be quite expensive in a testing pipeline especially if you could run it once instead. There are conftest available where you can initialize a given model once and re-use it across tests: https://github.com/MaartenGr/BERTopic/blob/master/tests/conftest.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Minor fix to fit_transform() to fix the issue of
topic_sizes_not being updated in zero-shot topic modeling when using thenr_topicsparameter. Adds tests to confirm the fix and provides a small changelog update.Happy to revise further if any revisions are desired.
Fixes #2384
Before submitting