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

Error when launching on docker #6

Open
SninaH opened this issue Aug 11, 2024 · 0 comments
Open

Error when launching on docker #6

SninaH opened this issue Aug 11, 2024 · 0 comments

Comments

@SninaH
Copy link

SninaH commented Aug 11, 2024

When launching the nemo model in docker I get errors.
This issue was not present in the pull request. The problem is probably in the pydantic version as the docker file in the pull request had a row RUN python3 -m pip install pydantic==1.8.2

The error I got when launching the transcriber server in docker:

transcriber-1  | [NeMo W 2024-05-15 15:02:15 optimizers:77] Could not import distributed_fused_adam optimizer from Apex
transcriber-1  | [NeMo D 2024-05-15 15:02:17 common:489] Model instantiation failed!
transcriber-1  | 	Target class:  	nemo.collections.asr.models.ctc_bpe_models.EncDecCTCModelBPE
transcriber-1  | 	Error(s):  cannot import name 'Annotated' from 'pydantic.typing' (/opt/conda/lib/python3.8/site-packages/pydantic/typing.py)
transcriber-1  | 	Traceback (most recent call last):
transcriber-1  |   	File "/opt/conda/lib/python3.8/site-packages/nemo/core/classes/common.py", line 475, in from_config_dict
transcriber-1  |     	imported_cls = import_class_by_path(target_cls)
transcriber-1  |   	File "/opt/conda/lib/python3.8/site-packages/nemo/utils/model_utils.py", line 471, in import_class_by_path
transcriber-1  |     	mod = __import__(path, fromlist=[class_name])
transcriber-1  |   	File "/opt/conda/lib/python3.8/site-packages/nemo/collections/asr/__init__.py", line 15, in <module>
transcriber-1  |     	from nemo.collections.asr import data, losses, models, modules
transcriber-1  |   	File "/opt/conda/lib/python3.8/site-packages/nemo/collections/asr/models/__init__.py", line 16, in <module>
transcriber-1  |     	from nemo.collections.asr.models.classification_models import EncDecClassificationModel
transcriber-1  |   	File "/opt/conda/lib/python3.8/site-packages/nemo/collections/asr/models/classification_models.py", line 28, in <module>
transcriber-1  |     	from nemo.collections.asr.data import audio_to_label_dataset
transcriber-1  |   	File "/opt/conda/lib/python3.8/site-packages/nemo/collections/asr/data/audio_to_label_dataset.py", line 15, in <module>
transcriber-1  |     	from nemo.collections.asr.data import audio_to_label
transcriber-1  |   	File "/opt/conda/lib/python3.8/site-packages/nemo/collections/asr/data/audio_to_label.py", line 22, in <module>
transcriber-1  |     	from nemo.collections.asr.data.audio_to_text import expand_audio_filepaths
transcriber-1  |   	File "/opt/conda/lib/python3.8/site-packages/nemo/collections/asr/data/audio_to_text.py", line 25, in <module>
transcriber-1  |     	from nemo.collections.asr.parts.preprocessing.features import WaveformFeaturizer
transcriber-1  |   	File "/opt/conda/lib/python3.8/site-packages/nemo/collections/asr/parts/preprocessing/__init__.py", line 16, in <module>
transcriber-1  |     	from nemo.collections.asr.parts.preprocessing.features import FeaturizerFactory, FilterbankFeatures, WaveformFeaturizer
transcriber-1  |   	File "/opt/conda/lib/python3.8/site-packages/nemo/collections/asr/parts/preprocessing/features.py", line 43, in <module>
transcriber-1  |     	from nemo.collections.asr.parts.preprocessing.perturb import AudioAugmentor
transcriber-1  |   	File "/opt/conda/lib/python3.8/site-packages/nemo/collections/asr/parts/preprocessing/perturb.py", line 50, in <module>
transcriber-1  |     	from nemo.collections.common.parts.preprocessing import collections, parsers
transcriber-1  |   	File "/opt/conda/lib/python3.8/site-packages/nemo/collections/common/parts/preprocessing/collections.py", line 24, in <module>
transcriber-1  |     	from nemo.collections.common.parts.preprocessing import manifest, parsers
transcriber-1  |   	File "/opt/conda/lib/python3.8/site-packages/nemo/collections/common/parts/preprocessing/parsers.py", line 25, in <module>
transcriber-1  |     	from nemo.collections.common.parts.preprocessing import cleaners
transcriber-1  |   	File "/opt/conda/lib/python3.8/site-packages/nemo/collections/common/parts/preprocessing/cleaners.py", line 17, in <module>
transcriber-1  |     	import inflect
transcriber-1  |   	File "/opt/conda/lib/python3.8/site-packages/inflect/__init__.py", line 73, in <module>
transcriber-1  |     	from pydantic.typing import Annotated
transcriber-1  | 	ImportError: cannot import name 'Annotated' from 'pydantic.typing' (/opt/conda/lib/python3.8/site-packages/pydantic/typing.py)
transcriber-1  |	 
transcriber-1  | 	Falling back to `cls`.
transcriber-1  | [NeMo E 2024-05-15 15:02:17 common:503] Model instantiation failed!
transcriber-1  | 	Target class:  	nemo.collections.asr.models.ctc_bpe_models.EncDecCTCModelBPE
transcriber-1  | 	Error(s):  cannot import name 'Annotated' from 'pydantic.typing' (/opt/conda/lib/python3.8/site-packages/pydantic/typing.py)
transcriber-1  | 	Traceback (most recent call last):
transcriber-1  |   	File "/opt/conda/lib/python3.8/site-packages/nemo/core/classes/common.py", line 475, in from_config_dict
transcriber-1  |     	imported_cls = import_class_by_path(target_cls)
transcriber-1  |   	File "/opt/conda/lib/python3.8/site-packages/nemo/utils/model_utils.py", line 471, in import_class_by_path
transcriber-1  |     	mod = __import__(path, fromlist=[class_name])
transcriber-1  |   	File "/opt/conda/lib/python3.8/site-packages/nemo/collections/asr/__init__.py", line 15, in <module>
transcriber-1  |     	from nemo.collections.asr import data, losses, models, modules
transcriber-1  |   	File "/opt/conda/lib/python3.8/site-packages/nemo/collections/asr/models/__init__.py", line 16, in <module>
transcriber-1  |     	from nemo.collections.asr.models.classification_models import EncDecClassificationModel
transcriber-1  |   	File "/opt/conda/lib/python3.8/site-packages/nemo/collections/asr/models/classification_models.py", line 28, in <module>
transcriber-1  |     	from nemo.collections.asr.data import audio_to_label_dataset
transcriber-1  |   	File "/opt/conda/lib/python3.8/site-packages/nemo/collections/asr/data/audio_to_label_dataset.py", line 15, in <module>
transcriber-1  |     	from nemo.collections.asr.data import audio_to_label
transcriber-1  |   	File "/opt/conda/lib/python3.8/site-packages/nemo/collections/asr/data/audio_to_label.py", line 22, in <module>
transcriber-1  |     	from nemo.collections.asr.data.audio_to_text import expand_audio_filepaths
transcriber-1  |   	File "/opt/conda/lib/python3.8/site-packages/nemo/collections/asr/data/audio_to_text.py", line 25, in <module>
transcriber-1  |     	from nemo.collections.asr.parts.preprocessing.features import WaveformFeaturizer
transcriber-1  |   	File "/opt/conda/lib/python3.8/site-packages/nemo/collections/asr/parts/preprocessing/__init__.py", line 16, in <module>
transcriber-1  |     	from nemo.collections.asr.parts.preprocessing.features import FeaturizerFactory, FilterbankFeatures, WaveformFeaturizer
transcriber-1  |   	File "/opt/conda/lib/python3.8/site-packages/nemo/collections/asr/parts/preprocessing/features.py", line 43, in <module>
transcriber-1  |     	from nemo.collections.asr.parts.preprocessing.perturb import AudioAugmentor
transcriber-1  |   	File "/opt/conda/lib/python3.8/site-packages/nemo/collections/asr/parts/preprocessing/perturb.py", line 50, in <module>
transcriber-1  |     	from nemo.collections.common.parts.preprocessing import collections, parsers
transcriber-1  |   	File "/opt/conda/lib/python3.8/site-packages/nemo/collections/common/parts/preprocessing/collections.py", line 24, in <module>
transcriber-1  |     	from nemo.collections.common.parts.preprocessing import manifest, parsers
transcriber-1  |   	File "/opt/conda/lib/python3.8/site-packages/nemo/collections/common/parts/preprocessing/parsers.py", line 25, in <module>
transcriber-1  |     	from nemo.collections.common.parts.preprocessing import cleaners
transcriber-1  |   	File "/opt/conda/lib/python3.8/site-packages/nemo/collections/common/parts/preprocessing/cleaners.py", line 17, in <module>
transcriber-1  |     	import inflect
transcriber-1  |   	File "/opt/conda/lib/python3.8/site-packages/inflect/__init__.py", line 73, in <module>
transcriber-1  |     	from pydantic.typing import Annotated
transcriber-1  | 	ImportError: cannot import name 'Annotated' from 'pydantic.typing' (/opt/conda/lib/python3.8/site-packages/pydantic/typing.py)
transcriber-1  |	 
transcriber-1  | Traceback (most recent call last):
transcriber-1  |   File "server.py", line 268, in <module>
transcriber-1  | 	start_time, models, num_requests_processed = initialize()
transcriber-1  |   File "server.py", line 245, in initialize
transcriber-1  | 	model = ModelPT.restore_from(_model_path,map_location="cuda" if _model_platform == "gpu" else "cpu")
transcriber-1  |   File "/opt/conda/lib/python3.8/site-packages/nemo/core/classes/modelPT.py", line 311, in restore_from
transcriber-1  | 	instance = cls._save_restore_connector.restore_from(
transcriber-1  |   File "/opt/conda/lib/python3.8/site-packages/nemo/core/connectors/save_restore_connector.py", line 235, in restore_from
transcriber-1  | 	loaded_params = self.load_config_and_state_dict(
transcriber-1  |   File "/opt/conda/lib/python3.8/site-packages/nemo/core/connectors/save_restore_connector.py", line 158, in load_config_and_state_dict
transcriber-1  | 	instance = calling_cls.from_config_dict(config=conf, trainer=trainer)
transcriber-1  |   File "/opt/conda/lib/python3.8/site-packages/nemo/core/classes/common.py", line 504, in from_config_dict
transcriber-1  | 	raise e
transcriber-1  |   File "/opt/conda/lib/python3.8/site-packages/nemo/core/classes/common.py", line 496, in from_config_dict
transcriber-1  | 	instance = cls(cfg=config, trainer=trainer)
transcriber-1  | TypeError: Can't instantiate abstract class ModelPT with abstract methods list_available_models, setup_training_data, setup_validation_data
transcriber-1 exited with code 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant