NeMo icon indicating copy to clipboard operation
NeMo copied to clipboard

Import Error

Open Hrithik2212 opened this issue 3 years ago • 1 comments
trafficstars

**Unable to import ASR model from Nemo.Collections **

import nemo.collections.asr as nemo_asr

Expected behavior

A clear and concise description of what you expected to happen.

Environment overview (please complete the following information)

** Error Message Error

ModuleNotFoundError Traceback (most recent call last) in () 3 # NeMo's ASR collection - this collections contains complete ASR models and 4 # building blocks (modules) for ASR ----> 5 import nemo.collections.asr as nemo_asr

17 frames /usr/local/lib/python3.7/dist-packages/pytorch_lightning/utilities/apply_func.py in () 27 if _TORCHTEXT_AVAILABLE: 28 if _compare_version("torchtext", operator.ge, "0.9.0"): ---> 29 from torchtext.legacy.data import Batch 30 else: 31 from torchtext.data import Batch

ModuleNotFoundError: No module named 'torchtext.legacy' **

  • Environment location: Collab
  • Method of NeMo install: pip install

Environment details

If NVIDIA docker image is used you don't need to specify these. Otherwise, please provide:

  • PyTorch version - 1.12
  • Python version - 3.7

Additional context

Add any other context about the problem here. Example: GPU model

Hrithik2212 avatar Aug 03 '22 01:08 Hrithik2212

What version of pytorch lightning is installed ? We require a more recent version such as 1.6.5

titu1994 avatar Aug 03 '22 03:08 titu1994

closing due to inactivity. please reopen if not resolved

yzhang123 avatar Aug 25 '22 14:08 yzhang123