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

Remove "sklearn" from requirements #234

Closed
melanopsis opened this issue Dec 9, 2022 · 10 comments
Closed

Remove "sklearn" from requirements #234

melanopsis opened this issue Dec 9, 2022 · 10 comments
Assignees

Comments

@melanopsis
Copy link

sklearn is being deprecated. Please see https://github.com/scikit-learn/sklearn-pypi-package.

@georgakd
Copy link

georgakd commented Jan 9, 2023

Is there any update on this issue? It really causes us issues in our internal NLP LDA project.

@ahmaddynugroho
Copy link

here's how i manually fix this:

  1. download the package from https://pypi.org/project/pyLDAvis/#files
  2. extract it and locate requirements.txt
  3. delete sklearn line
  4. now you can use it. because i'm using Poetry i run poetry add modified_pyldavis_folder
  5. done

i was trying to make a pull request but it requires a test

@bmabey
Copy link
Owner

bmabey commented Jan 26, 2023

@msusol is this something you plan on tackling? Otherwise I'd accept a PR from anyone on this thread.

@matthewkdies
Copy link
Contributor

Adding a bump here because this issue is affecting me as well. I can take a stab at it if we don't hear further from Mark.

@matthewkdies
Copy link
Contributor

I went ahead and created a PR for this regardless, here's the link here: #236

@msusol
Copy link
Collaborator

msusol commented Feb 11, 2023

Let me look at it in the morning

@msusol
Copy link
Collaborator

msusol commented Feb 11, 2023

Question for community: Is this just a change for PyPI, or for importing in python as well?

https://github.com/scikit-learn/sklearn-pypi-package#reason-for-the-deprecation

"if the sklearn package is used by one of your dependencies it would be great if you take some time to track which package uses sklearn instead of scikit-learn"

Update: https://stackoverflow.com/a/54573708/8930127

from sklearn.manifold import MDS, TSNE -> still valid command

@msusol
Copy link
Collaborator

msusol commented Feb 12, 2023

extract it and locate requirements.txt
delete sklearn line

The desired deprecation driven change is that sklearn is not to be in PyPI (Pipfile), nothing else changes.

I think the bigger issue I found is when I run the tox tests w/sklearn in requirements.txt as required, it gives me:

from sklearn.manifold import MDS, TSNE
E   ModuleNotFoundError: No module named 'sklearn.manifold'; 'sklearn' is not a package

which was masked by this try

try:
    from sklearn.manifold import MDS, TSNE
    sklearn_present = True
except ImportError:
    sklearn_present = False

Renaming sklearn.py to lda_model.py solves the isssue in tox after I removed this.

Please let me know what issues you were seeing, specifically.

@msusol
Copy link
Collaborator

msusol commented Feb 12, 2023

69a5003

(will work on pip package shortly)

@msusol
Copy link
Collaborator

msusol commented Feb 15, 2023

Resolved in v 3.4.0

@msusol msusol closed this as completed Feb 15, 2023
msusol added a commit that referenced this issue Feb 15, 2023
Upgrade to min sckikit-learn dependency for other issues with outdated sklearn code.
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

6 participants