Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

AttributeError: module 'numpy' has no attribute 'int' #46

Closed
galleon opened this issue Mar 24, 2023 · 2 comments
Closed

AttributeError: module 'numpy' has no attribute 'int' #46

galleon opened this issue Mar 24, 2023 · 2 comments

Comments

@galleon
Copy link

galleon commented Mar 24, 2023

I am trying to install clearml serving on python 3.9.
The problem seems to be related to new releases of numpy.

Here is the full stack trace:

clearml-serving create --name "serving example"

Traceback (most recent call last):
  File "/Users/galleon/.pyenv/versions/maio-serving/bin/clearml-serving", line 5, in <module>
    from clearml_serving.__main__ import main
  File "/Users/galleon/.pyenv/versions/3.9.16/envs/maio-serving/lib/python3.9/site-packages/clearml_serving/__main__.py", line 9, in <module>
    from clearml_serving.serving.model_request_processor import ModelRequestProcessor, CanaryEP
  File "/Users/galleon/.pyenv/versions/3.9.16/envs/maio-serving/lib/python3.9/site-packages/clearml_serving/serving/model_request_processor.py", line 18, in <module>
    from .preprocess_service import BasePreprocessRequest
  File "/Users/galleon/.pyenv/versions/3.9.16/envs/maio-serving/lib/python3.9/site-packages/clearml_serving/serving/preprocess_service.py", line 247, in <module>
    class TritonPreprocessRequest(BasePreprocessRequest):
  File "/Users/galleon/.pyenv/versions/3.9.16/envs/maio-serving/lib/python3.9/site-packages/clearml_serving/serving/preprocess_service.py", line 253, in TritonPreprocessRequest
    np.int: 'int_contents',
  File "/Users/galleon/.pyenv/versions/3.9.16/envs/maio-serving/lib/python3.9/site-packages/numpy/__init__.py", line 305, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'int'.
`np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

Installed packages:

pip list
Package            Version
------------------ -----------
attrs              22.2.0
certifi            2022.12.7
charset-normalizer 3.1.0
clearml            1.9.3
clearml-serving    1.2.0
furl               2.1.3
idna               3.4
jsonschema         4.17.3
numpy              1.24.2
orderedmultidict   1.0.1
pathlib2           2.3.7.post1
Pillow             9.4.0
pip                23.0.1
psutil             5.9.4
PyJWT              2.4.0
pyparsing          3.0.9
pyrsistent         0.19.3
python-dateutil    2.8.2
PyYAML             6.0
requests           2.28.2
setuptools         58.1.0
six                1.16.0
urllib3            1.26.15
@pollfly
Copy link
Contributor

pollfly commented Apr 18, 2023

Hey @galleon ! Just letting you know that this issue has been resolved in the recently released v1.3.0. Let us know if there are any issues :)

@jkhenning
Copy link
Member

@galleon closing this. Please reopen if required.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants