Versions incompability
State: closed | Pull request: no
Labels: name: bug

nemo-toolkit 1.7.0 requires numpy>=1.21
but with import asr models:
Traceback (most recent call last):
  File "nemo_check.py", line 45, in <module>
    import nemo.collections.asr as nemo_asr
  File "/media/meshkovaki/34EC69CAF782C377/Projects/experiments/text/nemo/lib/python3.8/site-packages/nemo/collections/asr/__init__.py", line 15, in <module>
    from nemo.collections.asr import data, losses, models, modules
  File "/media/meshkovaki/34EC69CAF782C377/Projects/experiments/text/nemo/lib/python3.8/site-packages/nemo/collections/asr/losses/__init__.py", line 15, in <module>
    from nemo.collections.asr.losses.angularloss import AngularSoftmaxLoss
  File "/media/meshkovaki/34EC69CAF782C377/Projects/experiments/text/nemo/lib/python3.8/site-packages/nemo/collections/asr/losses/angularloss.py", line 18, in <module>
    from nemo.core.classes import Loss, Typing, typecheck
  File "/media/meshkovaki/34EC69CAF782C377/Projects/experiments/text/nemo/lib/python3.8/site-packages/nemo/core/__init__.py", line 16, in <module>
    from nemo.core.classes import *
  File "/media/meshkovaki/34EC69CAF782C377/Projects/experiments/text/nemo/lib/python3.8/site-packages/nemo/core/classes/__init__.py", line 18, in <module>
    import pytorch_lightning
  File "/media/meshkovaki/34EC69CAF782C377/Projects/experiments/text/nemo/lib/python3.8/site-packages/pytorch_lightning/__init__.py", line 20, in <module>
    from pytorch_lightning.callbacks import Callback  # noqa: E402
  File "/media/meshkovaki/34EC69CAF782C377/Projects/experiments/text/nemo/lib/python3.8/site-packages/pytorch_lightning/callbacks/__init__.py", line 14, in <module>
    from pytorch_lightning.callbacks.base import Callback
  File "/media/meshkovaki/34EC69CAF782C377/Projects/experiments/text/nemo/lib/python3.8/site-packages/pytorch_lightning/callbacks/base.py", line 26, in <module>
    from pytorch_lightning.utilities.types import STEP_OUTPUT
  File "/media/meshkovaki/34EC69CAF782C377/Projects/experiments/text/nemo/lib/python3.8/site-packages/pytorch_lightning/utilities/types.py", line 25, in <module>
    from torchmetrics import Metric
  File "/media/meshkovaki/34EC69CAF782C377/Projects/experiments/text/nemo/lib/python3.8/site-packages/torchmetrics/__init__.py", line 14, in <module>
    from torchmetrics import functional  # noqa: E402
  File "/media/meshkovaki/34EC69CAF782C377/Projects/experiments/text/nemo/lib/python3.8/site-packages/torchmetrics/functional/__init__.py", line 14, in <module>
    from torchmetrics.functional.audio.pit import permutation_invariant_training, pit, pit_permutate
  File "/media/meshkovaki/34EC69CAF782C377/Projects/experiments/text/nemo/lib/python3.8/site-packages/torchmetrics/functional/audio/__init__.py", line 26, in <module>
    from torchmetrics.functional.audio.pesq import perceptual_evaluation_speech_quality  # noqa: F401
  File "/media/meshkovaki/34EC69CAF782C377/Projects/experiments/text/nemo/lib/python3.8/site-packages/torchmetrics/functional/audio/pesq.py", line 20, in <module>
    import pesq as pesq_backend
  File "/media/meshkovaki/34EC69CAF782C377/Projects/experiments/text/nemo/lib/python3.8/site-packages/pesq/__init__.py", line 6, in <module>
    from .cypesq import cypesq, cypesq_retvals, cypesq_error_message as pesq_error_message
  File "pesq/cypesq.pyx", line 1, in init cypesq
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

pip3 install --upgrade numpy

resolves the issue above, but there is new then
Traceback (most recent call last):
  File "nemo_check.py", line 45, in <module>
    import nemo.collections.asr as nemo_asr
  File "/media/meshkovaki/34EC69CAF782C377/Projects/experiments/text/nemo/lib/python3.8/site-packages/nemo/collections/asr/__init__.py", line 15, in <module>
    from nemo.collections.asr import data, losses, models, modules
  File "/media/meshkovaki/34EC69CAF782C377/Projects/experiments/text/nemo/lib/python3.8/site-packages/nemo/collections/asr/models/__init__.py", line 16, in <module>
    from nemo.collections.asr.models.classification_models import EncDecClassificationModel
  File "/media/meshkovaki/34EC69CAF782C377/Projects/experiments/text/nemo/lib/python3.8/site-packages/nemo/collections/asr/models/classification_models.py", line 28, in <module>
    from nemo.collections.asr.data import audio_to_label_dataset
  File "/media/meshkovaki/34EC69CAF782C377/Projects/experiments/text/nemo/lib/python3.8/site-packages/nemo/collections/asr/data/audio_to_label_dataset.py", line 15, in <module>
    from nemo.collections.asr.data import audio_to_label
  File "/media/meshkovaki/34EC69CAF782C377/Projects/experiments/text/nemo/lib/python3.8/site-packages/nemo/collections/asr/data/audio_to_label.py", line 22, in <module>
    from nemo.collections.asr.parts.preprocessing.segment import available_formats as valid_sf_formats
  File "/media/meshkovaki/34EC69CAF782C377/Projects/experiments/text/nemo/lib/python3.8/site-packages/nemo/collections/asr/parts/preprocessing/__init__.py", line 16, in <module>
    from nemo.collections.asr.parts.preprocessing.features import (
  File "/media/meshkovaki/34EC69CAF782C377/Projects/experiments/text/nemo/lib/python3.8/site-packages/nemo/collections/asr/parts/preprocessing/features.py", line 38, in <module>
    import librosa
  File "/media/meshkovaki/34EC69CAF782C377/Projects/experiments/text/nemo/lib/python3.8/site-packages/librosa/__init__.py", line 209, in <module>
    from . import core
  File "/media/meshkovaki/34EC69CAF782C377/Projects/experiments/text/nemo/lib/python3.8/site-packages/librosa/core/__init__.py", line 5, in <module>
    from .convert import *  # pylint: disable=wildcard-import
  File "/media/meshkovaki/34EC69CAF782C377/Projects/experiments/text/nemo/lib/python3.8/site-packages/librosa/core/convert.py", line 7, in <module>
    from . import notation
  File "/media/meshkovaki/34EC69CAF782C377/Projects/experiments/text/nemo/lib/python3.8/site-packages/librosa/core/notation.py", line 8, in <module>
    from ..util.exceptions import ParameterError
  File "/media/meshkovaki/34EC69CAF782C377/Projects/experiments/text/nemo/lib/python3.8/site-packages/librosa/util/__init__.py", line 77, in <module>
    from .utils import *  # pylint: disable=wildcard-import
  File "/media/meshkovaki/34EC69CAF782C377/Projects/experiments/text/nemo/lib/python3.8/site-packages/librosa/util/utils.py", line 9, in <module>
    import numba
  File "/media/meshkovaki/34EC69CAF782C377/Projects/experiments/text/nemo/lib/python3.8/site-packages/numba/__init__.py", line 200, in <module>
    _ensure_critical_deps()
  File "/media/meshkovaki/34EC69CAF782C377/Projects/experiments/text/nemo/lib/python3.8/site-packages/numba/__init__.py", line 140, in _ensure_critical_deps
    raise ImportError("Numba needs NumPy 1.21 or less")
ImportError: Numba needs NumPy 1.21 or less