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

Does not work on Python 3.9. #8

Open
alvynabranches opened this issue Sep 22, 2024 · 0 comments
Open

Does not work on Python 3.9. #8

alvynabranches opened this issue Sep 22, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@alvynabranches
Copy link

Describe the bug

Code

import torch
import nemo.collections.asr as nemo_asr

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model = nemo_asr.models.EncDecCTCModel.restore_from(
    restore_path="/Users/user/Downloads/ai4b_indicConformer_kok.nemo"
)
model.freeze()
model = model.to(device)

Error

Traceback (most recent call last):
  File "/Users/user/konkani_stt/kok_indic.py", line 2, in <module>
    import nemo.collections.asr as nemo_asr
  File "/Users/user/Library/Python/3.9/lib/python/site-packages/nemo/__init__.py", line 36, in <module>
    from nemo.utils import logging, logging_mode
  File "/Users/user/Library/Python/3.9/lib/python/site-packages/nemo/utils/__init__.py", line 19, in <module>
    from .nemo_logging import Logger as _Logger
  File "/Users/user/Library/Python/3.9/lib/python/site-packages/nemo/utils/nemo_logging.py", line 23, in <module>
    from nemo.constants import NEMO_ENV_VARNAME_REDIRECT_LOGS_TO_STDERR
  File "/Users/user/Library/Python/3.9/lib/python/site-packages/nemo/constants.py", line 24, in <module>
    np.int,
  File "/Users/user/Library/Python/3.9/lib/python/site-packages/numpy/__init__.py", line 394, 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

Expected behavior

Code should run

Environment overview (please complete the following information)

GCP VM
No GPU

@alvynabranches alvynabranches added the bug Something isn't working label Sep 22, 2024
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

No branches or pull requests

1 participant