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)
Describe the bug
Code
Error
Expected behavior
Code should run
Environment overview (please complete the following information)
GCP VM No GPU