-
Notifications
You must be signed in to change notification settings - Fork 756
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
c_tf_idf_.indptr is None when attempting to save merged model #2020
Comments
I notice that this is only a problem if I run with |
Ah, I think that's because |
In that case, the question is: How do we handle saving models when I would propose that the fix here is either:
@MaartenGr Any preference between (1) and (2)? |
@ddicato I would actually suggest a third solution. Instead of raising an exception, raise a log a warning instead that mentions that the c-TF-IDF representation cannot be saved since As a side note, I have thought about trying to merge the c-TF-IDF representations from both models since they generally have the same underlying c-TF-IDF parameters. It seldom happens that users use different CountVectorizers for the models they merge. It would, however, generally require access to the Bag-of-Words representation (which is not saved) and not the c-TF-IDF representation (which is saved). Hmm, something to think about... |
I like your third solution better. Users get a more useful error message with minimal disruption. That's an interesting side note. Would this issue be the right place to continue the discussion? #1878 |
Good to hear! I will put it on the backlog for me to do, but if you or anyone else wants to work on this then that would be highly appreciated.
Ah right, that might be a nice place to indeed continue that discussion. |
After using
BERTopic.merge_models
, I am unable to save the resulting model. Here is some repro code:I get the following output:
The text was updated successfully, but these errors were encountered: