Skip to content

Issue with import from LatentDirichletAllocation #15884

@glemaitre

Description

@glemaitre

Some people are getting an issue after updating scikit-learn:

  File "/home/jupyter/.local/lib/python3.5/site-packages/sklearn/decomposition/__init__.py", line 19, in <module>
    from ._online_lda import LatentDirichletAllocation
ImportError: cannot import name 'LatentDirichletAllocation'

There an SO question about it: https://stackoverflow.com/questions/59240556/latentdirichletallocation-was-not-installed-in-decomposition-module-of-scikit-le

and we got an issue reported in imbalanced-learn: scikit-learn-contrib/imbalanced-learn#663

I assume that this is not just bad luck. However, I cannot reproduce it locally. It is for sure linked to the privatization of the online_lda module but I don't get how to trigger that.

NB: I will write an answer in the so because the "solution" is a really bad fix and if we could get feedback on this issue to solve it, it would be great.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions