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

FileNotFoundError: Model stt_fa_fastconformer_hybrid_large was not found. #9151

Open
csukuangfj opened this issue May 9, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@csukuangfj
Copy link

Describe the bug

FileNotFoundError: Model stt_fa_fastconformer_hybrid_large was not found.

Steps/Code to reproduce bug

import nemo.collections.asr as nemo_asr
asr_model = nemo_asr.models.EncDecHybridRNNTCTCBPEModel.from_pretrained(model_name="stt_fa_fastconformer_hybrid_large")

You can find a colab notebook for reproducing at
https://colab.research.google.com/drive/1x9IeC5bvFa_DTGoH50MVSpVFNQ7FGYoS?usp=sharing

Expected behavior

I am following
https://catalog.ngc.nvidia.com/orgs/nvidia/teams/nemo/models/stt_fa_fastconformer_hybrid_large

It should work as expected by following the above link without throwing any errors.

Environment overview (please complete the following information)

Please see
https://colab.research.google.com/drive/1x9IeC5bvFa_DTGoH50MVSpVFNQ7FGYoS?usp=sharing

It should be reproducible under any environment with the master branch.

@csukuangfj csukuangfj added the bug Something isn't working label May 9, 2024
@csukuangfj
Copy link
Author

By the way,

import nemo.collections.asr as nemo_asr
asr_model = nemo_asr.models.EncDecHybridRNNTCTCBPEModel.from_pretrained(model_name="stt_ua_fastconformer_hybrid_large_pc")

from
https://catalog.ngc.nvidia.com/orgs/nvidia/teams/nemo/models/stt_ua_fastconformer_hybrid_large_pc

throws the following error:

[NeMo I 2024-05-09 02:22:17 nemo_logging:381] PADDING: 0
[NeMo E 2024-05-09 02:22:17 nemo_logging:405] Model instantiation failed!
    Target class:       nemo.collections.asr.models.hybrid_rnnt_ctc_bpe_models.EncDecHybridRNNTCTCBPEModel
    Error(s):   Error in call to target 'nemo.collections.asr.modules.conformer_encoder.ConformerEncoder':
    TypeError("ConformerEncoder.__init__() got an unexpected keyword argument 'conv_pointwise_type'")
    Traceback (most recent call last):
      File "/mnt/sdb/shared/py311/lib/python3.11/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 92, in _call_target
        return _target_(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^
    TypeError: ConformerEncoder.__init__() got an unexpected keyword argument 'conv_pointwise_type'

    The above exception was the direct cause of the following exception:
    Traceback (most recent call last):
      File "/mnt/sdb/shared/py311/lib/python3.11/site-packages/nemo/core/classes/common.py", line 502, in from_config_dict
        instance = imported_cls(cfg=config, trainer=trainer)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/mnt/sdb/shared/py311/lib/python3.11/site-packages/nemo/collections/asr/models/hybrid_rnnt_ctc_bpe_models.py", line 94, in __init__
        super().__init__(cfg=cfg, trainer=trainer)
      File "/mnt/sdb/shared/py311/lib/python3.11/site-packages/nemo/collections/asr/models/hybrid_rnnt_ctc_models.py", line 45, in __init__
        super().__init__(cfg=cfg, trainer=trainer)
      File "/mnt/sdb/shared/py311/lib/python3.11/site-packages/nemo/collections/asr/models/rnnt_models.py", line 66, in __init__
        self.encoder = EncDecRNNTModel.from_config_dict(self.cfg.encoder)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/mnt/sdb/shared/py311/lib/python3.11/site-packages/nemo/core/classes/common.py", line 485, in from_config_dict
        instance = hydra.utils.instantiate(config=config)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/mnt/sdb/shared/py311/lib/python3.11/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 226, in instantiate
        return instantiate_node(
               ^^^^^^^^^^^^^^^^^
      File "/mnt/sdb/shared/py311/lib/python3.11/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 347, in instantiate_node
        return _call_target(_target_, partial, args, kwargs, full_key)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/mnt/sdb/shared/py311/lib/python3.11/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 97, in _call_target
        raise InstantiationException(msg) from e
    hydra.errors.InstantiationException: Error in call to target 'nemo.collections.asr.modules.conformer_encoder.ConformerEncoder':
    TypeError("ConformerEncoder.__init__() got an unexpected keyword argument 'conv_pointwise_type'")

@nithinraok
Copy link
Collaborator

Hi @csukuangfj , for models published on huggingface you need to prepend nvidia name as well along with model name. so command would look like

import nemo.collections.asr as nemo_asr
asr_model = nemo_asr.models.EncDecHybridRNNTCTCBPEModel.from_pretrained(model_name="nvidia/stt_fa_fastconformer_hybrid_large")

@nithinraok
Copy link
Collaborator

I could load stt_ua_fastconformer_hybrid_large_pc fine, could you please try again with: (btw I am on main branch)

asr_model = nemo_asr.models.EncDecHybridRNNTCTCBPEModel.from_pretrained(model_name="nvidia/stt_ua_fastconformer_hybrid_large_pc")

@csukuangfj
Copy link
Author

@nithinraok

Thank you for your reply.

nvidia/stt_fa_fastconformer_hybrid_large does work!

I have been following the doc at
https://catalog.ngc.nvidia.com/orgs/nvidia/teams/nemo/models/stt_fa_fastconformer_hybrid_large

The doc says stt_fa_fastconformer_hybrid_large, not nvidia/stt_fa_fastconformer_hybrid_large.

I hope that you either fix the doc or fix the NeMo code to support the doc.

@csukuangfj
Copy link
Author

for models published on huggingface

How can I figure out whether the model is published on huggingface or not?

I have been using https://catalog.ngc.nvidia.com/models to find models.

@nithinraok
Copy link
Collaborator

Looks like there is an issue with NGC model version, and hence I suggested huggingface model its just a copy of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants