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

suppress log output for mallet LDA #3009

Closed
beyondeye opened this issue Nov 27, 2020 · 6 comments
Closed

suppress log output for mallet LDA #3009

beyondeye opened this issue Nov 27, 2020 · 6 comments

Comments

@beyondeye
Copy link

I am running gensim LDA wrapper in a Google Cloud Run instance and I would like to suppress the logging during LDA build because it pollutes the logging output of the cloud run instance. It would be possible to add such an option to the gensim wrapper to mallet LDA?

@piskvorky
Copy link
Owner

IIRC we removed the Mallet wrapper from Gensim altogether in 4.0.0. CC @mpenkov .

If so, we can't add any new features to it, although you're free to copy the wrapper code from 3.8.3 and use it.

@beyondeye
Copy link
Author

Thanks, I don't see any mention to it in the changelog. but ok thanks for your answer. For a small corpus I am getting better coherence with Mallet wrapper than built gensim lda. Should I try gensim nmf instead?

@piskvorky
Copy link
Owner

Yes, Gibbs sampling (~Mallet) gives more accurate results than variational methods (~Gensim).

NMF is another option for interpretable (non-negative) topics. Whether / which of these methods will work best for you depends on the task, and a million other factors like preprocessing, parameters etc.

@piskvorky
Copy link
Owner

Thanks, I don't see any mention to it in the changelog

You're right, that PR is still open = unreleased in 4.0.0beta: #2972

@beyondeye
Copy link
Author

OK so I solved the issue: just for reference this is what I did:
in mallet distribution, I edited file mallet-2.0.8\class\cc\mallet\util\resources\logging.properties
and set .level= WARNING instead of .level= INFO.
By the way it is very unfortunate that you are dropping the ldamallet wrapper, but I guess it makes sense for you. I would suggest to keep the wrappers code in the code repository in some separate contrib package.
Thanks for your answers and explanations

@piskvorky
Copy link
Owner

piskvorky commented Nov 29, 2020

Thanks for sharing your solution.

Yes, out of all the wrappers, the Mallet wrapper is the one people use the most. Perhaps we could keep this one… if there's someone who could commit to maintaining it.

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