EliHei2 / segger_dev

a cutting-edge cell segmentation model specifically designed for single-molecule resolved spatial omics datasets. It addresses the challenge of accurately segmenting individual cells in complex imaging datasets, leveraging a unique approach based on graph neural networks (GNNs).
https://elihei2.github.io/segger_dev/
MIT License
38 stars 3 forks source link

Segger installation troubles #9

Closed pakiessling closed 1 month ago

pakiessling commented 2 months ago

Hi, there seem to be some problems with installation instructions right now.

git clone https://github.com/EliHei2/segger_dev.git
cd segger_dev
pip install .

Afterwardsimport segger fails with

ModuleNotFoundError: No module named 'segger.data'
ModuleNotFoundError: No module named 'segger.models'

Interesting installing in editable mode pip install -e . results in different messages:

Warning: faiss is not installed. Please install it to use this functionality.
Warning: cuml is not installed. Please install it to use this functionality.
Warning: cudf is not installed. Please install it to use this functionality.
Warning: cugraph is not installed. Please install it to use this functionality.
Warning: cuspatial is not installed. Please install it to use this functionality.
Warning: hnswlib is not installed. Please install it to use this functionality.

do I need to manualy install those packages?

LucaMarconato commented 2 months ago

ModuleNotFoundError: No module named 'segger.data' ModuleNotFoundError: No module named 'segger.models'

Hi, which file triggers these errors?

Regarding the second part of the question, pip install -e ".[extra]" should fix the warnings. The mismatch in the behavior may be due to the fact that dependencies are specified both in pyproject.toml and in setup.py instead in having just one of the fails.

pakiessling commented 2 months ago
>>> import segger
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/work/rwth1209/enviroments/segger3/lib/python3.11/site-packages/segger/__init__.py", line 4, in <module>
    from .data import *
ModuleNotFoundError: No module named 'segger.data'
EliHei2 commented 2 months ago

hey @pakiessling, Thanks for bringing this to our attention. The problem was providing 2 different setup files, for pip as @LucaMarconato mentioned. However, in order to solidly fix the dependencies for pyg, we need a more substantial fix. We're working on fixing this and I'll update you soon on this.

EliHei2 commented 2 months ago

@pakiessling I made come commits, and now installing via pip install -e . with options [rapids11], [rapids12], and [faiss] should be fine. could you check please?

pakiessling commented 2 months ago

Installation goes through without any warnings.

Afterwards:


>>> import segger
File "/work/rwth1209/enviroments/segger3/lib/python3.11/site-packages/numpy/core/_dtype.py", line 46, in __repr__
    arg_str = _construction_repr(dtype, include_align=False)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/work/rwth1209/enviroments/segger3/lib/python3.11/site-packages/numpy/core/_dtype.py", line 100, in _construction_repr
    return _scalar_str(dtype, short=short)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/work/rwth1209/enviroments/segger3/lib/python3.11/site-packages/numpy/core/_dtype.py", line 143, in _scalar_str
    elif np.issubdtype(dtype, np.number):
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/work/rwth1209/enviroments/segger3/lib/python3.11/site-packages/numpy/core/numerictypes.py", line 417, in issubdtype
    arg1 = dtype(arg1).type
           ^^^^^^^^^^^
  File "/work/rwth1209/enviroments/segger3/lib/python3.11/site-packages/numpy/core/_dtype.py", line 46, in __repr__
    arg_str = _construction_repr(dtype, include_align=False)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RecursionError: maximum recursion depth exceeded
EliHei2 commented 2 months ago

I can't reproduce this @pakiessling but maybe you could solve this by increasing the recursion depth in Python as discussed in this Stack Overflow solution?

EliHei2 commented 2 months ago

if this resolved your problem, I'd close this issue @pakiessling

pakiessling commented 2 months ago

Hey, unfortunaterly neither rapids 11 or rapids 12 result in a working installation for me on main.

I can send some error messages I am getting later

EliHei2 commented 2 months ago

yes please do, but could you install without optionals? pip install -e .?

pakiessling commented 2 months ago

Ah without extras everything installs without error. Cuda is also installed correct