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

Threshold TypingError in example notebook #51

Open
lezra1 opened this issue Jul 24, 2024 · 2 comments
Open

Threshold TypingError in example notebook #51

lezra1 opened this issue Jul 24, 2024 · 2 comments

Comments

@lezra1
Copy link

lezra1 commented Jul 24, 2024

Hi - I'm running through the FlyWing notebook example and have been running into a TypingError when reaching the threshold calculation step. I'm running numpy v1.2.6, and I've pasted part of the error below. Any ideas on how to fix this?

TypingError: Failed in nopython mode pipeline (step: nopython frontend)
No implementation of function Function(<built-in function zeros>) found for signature:
 
 >>> zeros(UniTuple(int64 x 2), dtype=Function(<class 'int'>))
 
There are 2 candidate implementations:
  - Of which 2 did not match due to:
  Overload in function 'ol_np_zeros': File: numba\np\arrayobj.py: Line 4452.
    With argument(s): '(UniTuple(int64 x 2), dtype=Function(<class 'int'>))':
   Rejected as the implementation raised a specific error:
     TypingError: Failed in nopython mode pipeline (step: nopython frontend)
   No implementation of function Function(<built-in function empty>) found for signature:
    
    >>> empty(UniTuple(int64 x 2), dtype=Function(<class 'int'>))
    
   There are 2 candidate implementations:
         - Of which 2 did not match due to:
         Overload in function 'ol_np_empty': File: numba\np\arrayobj.py: Line 4374.
           With argument(s): '(UniTuple(int64 x 2), dtype=Function(<class 'int'>))':
          Rejected as the implementation raised a specific error:
            TypingError: Cannot parse input types to function np.empty(UniTuple(int64 x 2), Function(<class 'int'>))
     raised from c:\Users\ezra0001\Anaconda3\envs\DenoiSeg3\lib\site-packages\numba\np\arrayobj.py:4393
   
   During: resolving callee type: Function(<built-in function empty>)
   During: typing of call at c:\Users\ezra0001\Anaconda3\envs\DenoiSeg3\lib\site-packages\numba\np\arrayobj.py (4457)
   
   
   File "..\..\..\..\Anaconda3\envs\DenoiSeg3\lib\site-packages\numba\np\arrayobj.py", line 4457:
       def impl(shape, dtype=float):
           arr = np.empty(shape, dtype=dtype)
           ^

  raised from c:\Users\ezra0001\Anaconda3\envs\DenoiSeg3\lib\site-packages\numba\core\typeinfer.py:1091

During: resolving callee type: Function(<built-in function zeros>)
During: typing of call at c:\Users\ezra0001\Anaconda3\envs\DenoiSeg3\lib\site-packages\denoiseg\utils\compute_precision_threshold.py (10)


File "..\..\..\..\Anaconda3\envs\DenoiSeg3\lib\site-packages\denoiseg\utils\compute_precision_threshold.py", line 10:
def pixel_sharing_bipartite(lab1, lab2):
    <source elided>
    assert lab1.shape == lab2.shape
    psg = np.zeros((lab1.max() + 1, lab2.max() + 1), dtype=int)
    ^
@tibuch
Copy link
Contributor

tibuch commented Jul 26, 2024

Could you provide the output of conda list?

@lezra1
Copy link
Author

lezra1 commented Jul 26, 2024

(DenoiSeg3) C:\Users\ezra0001>conda list
# packages in environment at C:\Users\ezra0001\Anaconda3\envs\DenoiSeg3:
#
# Name                    Version                   Build  Channel
absl-py                   2.1.0                    pypi_0    pypi
annotated-types           0.7.0                    pypi_0    pypi
asttokens                 2.0.5              pyhd3eb1b0_0
astunparse                1.6.3                    pypi_0    pypi
backcall                  0.2.0              pyhd3eb1b0_0
bioimageio-core           0.6.7                    pypi_0    pypi
bioimageio-spec           0.5.3.post4              pypi_0    pypi
ca-certificates           2024.7.2             haa95532_0
cachetools                5.4.0                    pypi_0    pypi
certifi                   2024.7.4                 pypi_0    pypi
charset-normalizer        3.3.2                    pypi_0    pypi
colorama                  0.4.6            py39haa95532_0
comm                      0.2.1            py39haa95532_0
contourpy                 1.2.1                    pypi_0    pypi
csbdeep                   0.7.4                    pypi_0    pypi
cycler                    0.12.1                   pypi_0    pypi
debugpy                   1.6.7            py39hd77b12b_0
decorator                 5.1.1              pyhd3eb1b0_0
denoiseg                  0.3.1                    pypi_0    pypi
distro                    1.9.0                    pypi_0    pypi
dnspython                 2.6.1                    pypi_0    pypi
email-validator           2.2.0                    pypi_0    pypi
exceptiongroup            1.2.0            py39haa95532_0
executing                 0.8.3              pyhd3eb1b0_0
fire                      0.6.0                    pypi_0    pypi
flatbuffers               24.3.25                  pypi_0    pypi
fonttools                 4.53.1                   pypi_0    pypi
gast                      0.4.0                    pypi_0    pypi
google-auth               2.32.0                   pypi_0    pypi
google-auth-oauthlib      0.4.6                    pypi_0    pypi
google-pasta              0.2.0                    pypi_0    pypi
grpcio                    1.64.1                   pypi_0    pypi
h5py                      3.11.0                   pypi_0    pypi
idna                      3.7                      pypi_0    pypi
imagecodecs               2024.6.1                 pypi_0    pypi
imageio                   2.34.2                   pypi_0    pypi
importlib-metadata        8.0.0                    pypi_0    pypi
importlib-resources       6.4.0                    pypi_0    pypi
importlib_metadata        7.0.1                hd3eb1b0_0
ipykernel                 6.28.0           py39haa95532_0
ipython                   8.15.0           py39haa95532_0
ipywidgets                8.1.3                    pypi_0    pypi
jedi                      0.19.1           py39haa95532_0
joblib                    1.4.2                    pypi_0    pypi
jupyter_client            8.6.0            py39haa95532_0
jupyter_core              5.7.2            py39haa95532_0
jupyterlab-widgets        3.0.11                   pypi_0    pypi
keras                     2.10.0                   pypi_0    pypi
keras-preprocessing       1.1.2                    pypi_0    pypi
kiwisolver                1.4.5                    pypi_0    pypi
lazy-loader               0.4                      pypi_0    pypi
libclang                  18.1.1                   pypi_0    pypi
libsodium                 1.0.18               h62dcd97_0
llvmlite                  0.43.0                   pypi_0    pypi
loguru                    0.7.2                    pypi_0    pypi
markdown                  3.6                      pypi_0    pypi
markdown-it-py            3.0.0                    pypi_0    pypi
markupsafe                2.1.5                    pypi_0    pypi
matplotlib                3.9.1                    pypi_0    pypi
matplotlib-inline         0.1.6            py39haa95532_0
mdurl                     0.1.2                    pypi_0    pypi
n2v                       0.3.3                    pypi_0    pypi
nest-asyncio              1.6.0            py39haa95532_0
networkx                  3.2.1                    pypi_0    pypi
numba                     0.60.0                   pypi_0    pypi
numpy                     1.26.4                   pypi_0    pypi
oauthlib                  3.2.2                    pypi_0    pypi
openssl                   3.0.14               h827c3e9_0
opt-einsum                3.3.0                    pypi_0    pypi
packaging                 24.1             py39haa95532_0
pandas                    2.2.2                    pypi_0    pypi
parso                     0.8.3              pyhd3eb1b0_0
pickleshare               0.7.5           pyhd3eb1b0_1003
pillow                    10.4.0                   pypi_0    pypi
pip                       24.0             py39haa95532_0
platformdirs              4.2.2                    pypi_0    pypi
pooch                     1.8.2                    pypi_0    pypi
prompt-toolkit            3.0.43           py39haa95532_0
protobuf                  3.19.6                   pypi_0    pypi
psutil                    5.9.0            py39h2bbff1b_0
pure_eval                 0.2.2              pyhd3eb1b0_0
pyasn1                    0.6.0                    pypi_0    pypi
pyasn1-modules            0.4.0                    pypi_0    pypi
pydantic                  2.8.2                    pypi_0    pypi
pydantic-core             2.20.1                   pypi_0    pypi
pydantic-settings         2.3.4                    pypi_0    pypi
pygments                  2.18.0                   pypi_0    pypi
pyparsing                 3.1.2                    pypi_0    pypi
python                    3.9.19               h1aa4202_1
python-dateutil           2.9.0post0       py39haa95532_2
python-dotenv             1.0.1                    pypi_0    pypi
pytz                      2024.1                   pypi_0    pypi
pywin32                   305              py39h2bbff1b_0
pyzmq                     25.1.2           py39hd77b12b_0
requests                  2.32.3                   pypi_0    pypi
requests-oauthlib         2.0.0                    pypi_0    pypi
rich                      13.7.1                   pypi_0    pypi
rsa                       4.9                      pypi_0    pypi
ruamel-yaml               0.18.6                   pypi_0    pypi
ruamel-yaml-clib          0.2.8                    pypi_0    pypi
ruyaml                    0.91.0                   pypi_0    pypi
scikit-image              0.24.0                   pypi_0    pypi
scikit-learn              1.5.1                    pypi_0    pypi
scipy                     1.13.1                   pypi_0    pypi
setuptools                69.5.1           py39haa95532_0
six                       1.16.0             pyhd3eb1b0_1
sqlite                    3.45.3               h2bbff1b_0
stack_data                0.2.0              pyhd3eb1b0_0
tensorboard               2.10.1                   pypi_0    pypi
tensorboard-data-server   0.6.1                    pypi_0    pypi
tensorboard-plugin-wit    1.8.1                    pypi_0    pypi
tensorflow                2.10.1                   pypi_0    pypi
tensorflow-estimator      2.10.0                   pypi_0    pypi
tensorflow-io-gcs-filesystem 0.31.0                   pypi_0    pypi
termcolor                 2.4.0                    pypi_0    pypi
threadpoolctl             3.5.0                    pypi_0    pypi
tifffile                  2024.7.2                 pypi_0    pypi
tornado                   6.4.1            py39h827c3e9_0
tqdm                      4.66.4                   pypi_0    pypi
traitlets                 5.14.3           py39haa95532_0
typing-extensions         4.12.2                   pypi_0    pypi
typing_extensions         4.11.0           py39haa95532_0
tzdata                    2024.1                   pypi_0    pypi
urllib3                   2.2.2                    pypi_0    pypi
vc                        14.2                 h2eaa2aa_4
vs2015_runtime            14.29.30133          h43f2093_4
wcwidth                   0.2.5              pyhd3eb1b0_0
werkzeug                  3.0.3                    pypi_0    pypi
wheel                     0.43.0           py39haa95532_0
widgetsnbextension        4.0.11                   pypi_0    pypi
win32-setctime            1.1.0                    pypi_0    pypi
wrapt                     1.12.1                   pypi_0    pypi
xarray                    2024.6.0                 pypi_0    pypi
zeromq                    4.3.5                hd77b12b_0
zipp                      3.19.2                   pypi_0    pypi

Am I missing a dependency?

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

2 participants