Error importing nemo.collections.asr from prebuilt nvcr nemo
State: closed | Pull request: no
Labels: name: bug

**Error message**


```
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
 in 
----> 1 import nemo.collections.asr as nemo_asr
      2 
      3 asr_models = [model for model in dir(nemo_asr.models) if model.endswith('Model')]
      4 asr_models

[~/.local/lib/python3.8/site-packages/nemo/collections/asr/__init__.py](https://vscode-remote+ssh-002dremote-002bapex-002dlogin-002ecmkl-002eac-002eth.vscode-resource.vscode-cdn.net/home/ekapolc/workspaces/yuat/diarization/~/.local/lib/python3.8/site-packages/nemo/collections/asr/__init__.py) in 
     13 # limitations under the License.
     14 
---> 15 from nemo.collections.asr import data, losses, models, modules
     16 from nemo.package_info import __version__
     17 

[~/.local/lib/python3.8/site-packages/nemo/collections/asr/losses/__init__.py](https://vscode-remote+ssh-002dremote-002bapex-002dlogin-002ecmkl-002eac-002eth.vscode-resource.vscode-cdn.net/home/ekapolc/workspaces/yuat/diarization/~/.local/lib/python3.8/site-packages/nemo/collections/asr/losses/__init__.py) in 
     13 # limitations under the License.
     14 
---> 15 from nemo.collections.asr.losses.angularloss import AngularSoftmaxLoss
     16 from nemo.collections.asr.losses.audio_losses import SDRLoss
     17 from nemo.collections.asr.losses.ctc import CTCLoss

[~/.local/lib/python3.8/site-packages/nemo/collections/asr/losses/angularloss.py](https://vscode-remote+ssh-002dremote-002bapex-002dlogin-002ecmkl-002eac-002eth.vscode-resource.vscode-cdn.net/home/ekapolc/workspaces/yuat/diarization/~/.local/lib/python3.8/site-packages/nemo/collections/asr/losses/angularloss.py) in 
     16 import torch
     17 
---> 18 from nemo.core.classes import Loss, Typing, typecheck
     19 from nemo.core.neural_types import LabelsType, LogitsType, LossType, NeuralType
     20 

[~/.local/lib/python3.8/site-packages/nemo/core/__init__.py](https://vscode-remote+ssh-002dremote-002bapex-002dlogin-002ecmkl-002eac-002eth.vscode-resource.vscode-cdn.net/home/ekapolc/workspaces/yuat/diarization/~/.local/lib/python3.8/site-packages/nemo/core/__init__.py) in 
     14 
     15 import nemo.core.neural_types
---> 16 from nemo.core.classes import *

[~/.local/lib/python3.8/site-packages/nemo/core/classes/__init__.py](https://vscode-remote+ssh-002dremote-002bapex-002dlogin-002ecmkl-002eac-002eth.vscode-resource.vscode-cdn.net/home/ekapolc/workspaces/yuat/diarization/~/.local/lib/python3.8/site-packages/nemo/core/classes/__init__.py) in 
     28 )
     29 from nemo.core.classes.dataset import Dataset, IterableDataset
---> 30 from nemo.core.classes.exportable import Exportable, ExportFormat
     31 from nemo.core.classes.loss import Loss
     32 from nemo.core.classes.mixins import access_mixins, adapter_mixins

[~/.local/lib/python3.8/site-packages/nemo/core/classes/exportable.py](https://vscode-remote+ssh-002dremote-002bapex-002dlogin-002ecmkl-002eac-002eth.vscode-resource.vscode-cdn.net/home/ekapolc/workspaces/yuat/diarization/~/.local/lib/python3.8/site-packages/nemo/core/classes/exportable.py) in 
     21 from nemo.core.utils.neural_type_utils import get_dynamic_axes, get_io_names
     22 from nemo.utils import logging
---> 23 from nemo.utils.export_utils import (
     24     ExportFormat,
     25     augment_filename,

[~/.local/lib/python3.8/site-packages/nemo/utils/export_utils.py](https://vscode-remote+ssh-002dremote-002bapex-002dlogin-002ecmkl-002eac-002eth.vscode-resource.vscode-cdn.net/home/ekapolc/workspaces/yuat/diarization/~/.local/lib/python3.8/site-packages/nemo/utils/export_utils.py) in 
     18 from typing import Callable, Dict, Optional, Type
     19 
---> 20 import onnx
     21 import torch
     22 import torch.nn as nn

[~/.local/lib/python3.8/site-packages/onnx/__init__.py](https://vscode-remote+ssh-002dremote-002bapex-002dlogin-002ecmkl-002eac-002eth.vscode-resource.vscode-cdn.net/home/ekapolc/workspaces/yuat/diarization/~/.local/lib/python3.8/site-packages/onnx/__init__.py) in 
     18 import onnx.checker  # noqa
     19 import onnx.defs  # noqa
---> 20 import onnx.helper  # noqa
     21 import onnx.utils  # noqa
     22 

[~/.local/lib/python3.8/site-packages/onnx/helper.py](https://vscode-remote+ssh-002dremote-002bapex-002dlogin-002ecmkl-002eac-002eth.vscode-resource.vscode-cdn.net/home/ekapolc/workspaces/yuat/diarization/~/.local/lib/python3.8/site-packages/onnx/helper.py) in 
     15     TypeProto, SequenceProto, MapProto, IR_VERSION, TrainingInfoProto
     16 from onnx import defs
---> 17 from onnx import mapping
     18 from onnx.mapping import STORAGE_TENSOR_TYPE_TO_FIELD
     19 from typing import Text, Sequence, Any, Optional, Dict, Union, TypeVar, Callable, Tuple, List, cast

[~/.local/lib/python3.8/site-packages/onnx/mapping.py](https://vscode-remote+ssh-002dremote-002bapex-002dlogin-002ecmkl-002eac-002eth.vscode-resource.vscode-cdn.net/home/ekapolc/workspaces/yuat/diarization/~/.local/lib/python3.8/site-packages/onnx/mapping.py) in 
     25     int(TensorProto.UINT32): np.dtype('uint32'),
     26     int(TensorProto.UINT64): np.dtype('uint64'),
---> 27     int(TensorProto.STRING): np.dtype(np.object)
     28 }
     29 

[~/.local/lib/python3.8/site-packages/numpy/__init__.py](https://vscode-remote+ssh-002dremote-002bapex-002dlogin-002ecmkl-002eac-002eth.vscode-resource.vscode-cdn.net/home/ekapolc/workspaces/yuat/diarization/~/.local/lib/python3.8/site-packages/numpy/__init__.py) in __getattr__(attr)
    303 
    304         if attr in __former_attrs__:
--> 305             raise AttributeError(__former_attrs__[attr])
    306 
    307         # Importing Tester requires importing all of UnitTest which is not a

AttributeError: module 'numpy' has no attribute 'object'.
`np.object` was a deprecated alias for the builtin `object`. To avoid this error in existing code, use `object` by itself. Doing this will not modify any behavior and is safe. 
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
```

**Environment overview 
Ran through slurm with the option '#srun --container-image=nvcr.io/nvidia/nemo:23.06'.
No additional modification to the environment.

**Additional context**

GPU model: A100

`import nemo` worked just fine, the error occurred when importing `nemo.collections.asr`