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

cebra_paper.yml needs updating #194

Closed
2 tasks done
researcherofreality opened this issue Nov 7, 2024 · 4 comments · Fixed by #195
Closed
2 tasks done

cebra_paper.yml needs updating #194

researcherofreality opened this issue Nov 7, 2024 · 4 comments · Fixed by #195
Assignees
Labels
bug Something isn't working

Comments

@researcherofreality
Copy link

researcherofreality commented Nov 7, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Bug description

when creating the venv using cebra_paper.yml an error gets thrown as seen in the error log; sklearn should be renamed to scikit-learn in the yml file. Upon changing that no errors get thrown when remaking the venv.

moreover, when this error is fixed and I try to import cebra using python, I get another error, "AttributeError: module 'numpy' has no attribute 'typeDict'". Fixed this by changing the numpy version to >=1.22.

Operating System

WSL2

CEBRA version

0.4.0

Device type

gpu

Steps To Reproduce

  1. download cebra_paper.yml
  2. in ubuntu 22.04 run: conda env create -f conda/cebra_paper.yml

Relevant log output

ERROR 1:

× python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [15 lines of output]
      The 'sklearn' PyPI package is deprecated, use 'scikit-learn'
      rather than 'sklearn' for pip commands.
      
      Here is how to fix this error in the main use cases:
      - use 'pip install scikit-learn' rather than 'pip install sklearn'
      - replace 'sklearn' by 'scikit-learn' in your pip requirements files
        (requirements.txt, setup.py, setup.cfg, Pipfile, etc ...)
      - 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' and report it to their issue tracker
      - as a last resort, set the environment variable
        SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True to avoid this error
      
      More information is available at
      https://github.com/scikit-learn/sklearn-pypi-package
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

failed

CondaEnvException: Pip failed

ERROR 2:
$ python
Python 3.8.0 (default, Nov 6 2019, 21:49:08)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.

import cebra
Traceback (most recent call last):
File "", line 1, in
File "/home/xxx/anaconda3/envs/cebra_paper/lib/python3.8/site-packages/cebra/init.py", line 31, in
from cebra.integrations.sklearn.cebra import CEBRA
File "/home/xxx/anaconda3/envs/cebra_paper/lib/python3.8/site-packages/cebra/integrations/sklearn/init.py", line 35, in
from cebra.integrations.sklearn import cebra
File "/home/xxx/anaconda3/envs/cebra_paper/lib/python3.8/site-packages/cebra/integrations/sklearn/cebra.py", line 33, in
import sklearn.utils.validation as sklearn_utils_validation
File "/home/xxx/anaconda3/envs/cebra_paper/lib/python3.8/site-packages/sklearn/init.py", line 82, in
from .base import clone
File "/home/xxx/anaconda3/envs/cebra_paper/lib/python3.8/site-packages/sklearn/base.py", line 17, in
from .utils import _IS_32BIT
File "/home/xxx/anaconda3/envs/cebra_paper/lib/python3.8/site-packages/sklearn/utils/init.py", line 17, in
from scipy.sparse import issparse
File "/home/xxx/anaconda3/envs/cebra_paper/lib/python3.8/site-packages/scipy/sparse/init.py", line 229, in
from .base import *
File "/home/xxx/anaconda3/envs/cebra_paper/lib/python3.8/site-packages/scipy/sparse/base.py", line 8, in
from .sputils import (isdense, isscalarlike, isintlike,
File "/home/xxx/anaconda3/envs/cebra_paper/lib/python3.8/site-packages/scipy/sparse/sputils.py", line 17, in
supported_dtypes = [np.typeDict[x] for x in supported_dtypes]
File "/home/xxx/anaconda3/envs/cebra_paper/lib/python3.8/site-packages/scipy/sparse/sputils.py", line 17, in
supported_dtypes = [np.typeDict[x] for x in supported_dtypes]
File "/home/xxx/anaconda3/envs/cebra_paper/lib/python3.8/site-packages/numpy/init.py", line 320, in getattr
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'typeDict'

Anything else?

No response

Code of Conduct

@researcherofreality researcherofreality changed the title rename sklearn to scikit-learn in cebra_paper.yml cebra_paper.yml needs updating Nov 7, 2024
@researcherofreality
Copy link
Author

other than that, thank you very much for the package, very interesting!

@stes
Copy link
Member

stes commented Nov 7, 2024

Good catch, thanks @researcherofreality ! Do you want to submit a PR with the update, or should I go ahead?

@stes stes added the bug Something isn't working label Nov 7, 2024
@researcherofreality
Copy link
Author

Hi @stes, I didn't fork the repo, I just downloaded the yml and went from there. Not sure how to PR in this case... Maybe best if you do it! Thank you

@stes
Copy link
Member

stes commented Nov 7, 2024

Then I will fix it, no worries!

PR is here: #195

Btw, @researcherofreality , note that you only need this conda environment if you want to run the full set of experiments, including comparisons to other algorithms like pi VAE we did in the CEBRA paper. For anything else, the other conda file is the better option with more up-to-date packages!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants