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

Can't find module past #423

Open
bdpedigo opened this issue Dec 10, 2024 · 4 comments · May be fixed by #428
Open

Can't find module past #423

bdpedigo opened this issue Dec 10, 2024 · 4 comments · May be fixed by #428
Labels
bug Something isn't working

Comments

@bdpedigo
Copy link
Contributor

graspologic builds are failing with

________________ ERROR collecting tests/cluster/test_autogmm.py ________________
ImportError while importing test module '/home/runner/work/graspologic/graspologic/tests/cluster/test_autogmm.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/opt/hostedtoolcache/Python/3.9.[20](https://github.com/graspologic-org/graspologic/actions/runs/12254240467/job/34184712749?pr=1093#step:6:21)/x64/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/cluster/test_autogmm.py:11: in <module>
    from graspologic.cluster.autogmm import AutoGMMCluster
graspologic/__init__.py:8: in <module>
    import graspologic.inference
graspologic/inference/__init__.py:6: in <module>
    from .latent_distribution_test import latent_distribution_test
graspologic/inference/latent_distribution_test.py:7: in <module>
    from hyppo.ksample import KSample
../../../.cache/pypoetry/virtualenvs/graspologic-pkHfzCJ8-py3.9/lib/python3.9/site-packages/hyppo/__init__.py:5: in <module>
    import hyppo.kgof
../../../.cache/pypoetry/virtualenvs/graspologic-pkHfzCJ8-py3.9/lib/python3.9/site-packages/hyppo/kgof/__init__.py:2: in <module>
    from .fssd import FSSD, FSSDH0SimCovObs
../../../.cache/pypoetry/virtualenvs/graspologic-pkHfzCJ8-py3.9/lib/python3.9/site-packages/hyppo/kgof/fssd.py:4: in <module>
    from past.utils import old_div
E   ModuleNotFoundError: No module named 'past'

I think it is missing from the dependencies

@bdpedigo bdpedigo added the bug Something isn't working label Dec 10, 2024
@sampan501
Copy link
Collaborator

Which hyppo version is being used? I believe this was fixed in #420 with v0.5.0

@bdpedigo
Copy link
Contributor Author

hmm I'm somehow still seeing it despite having 0.5.1 installed:

poetry show hyppo

 name         : hyppo                                        
 version      : 0.5.1                                        
 description  : A comprehensive independence testing package 

dependencies
 - autograd >=1.3
 - numba >=0.46
 - numpy >=1.17
 - scikit-learn >=0.19.1
 - scipy >=1.4.0

@manuelarceaguirre
Copy link

manuelarceaguirre commented Mar 4, 2025

Hi @bdpedigo @sampan501, I’ve opened a PR to fix the past dependency in fssd.py and test_density.py. Replaced old_div with / and used integer division in simulate_null_dist to resolve test failures. All 12 tests in hyppo/kgof/tests/ pass locally on Python 3.12.

@ebridge2
Copy link

ebridge2 commented Mar 13, 2025

@sampan501 future is not listed in setup.py file is causing issues with installing from github, anyways. I would assume since you use the setup.py to create the distribution package for pypi, pypi would never know about this dependency even though it's listed in the requirements.txt, so if you install from pip it will never work unless you already have future, right?

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
4 participants