NVIDIA / NeMo

A scalable generative AI framework built for researchers and developers working on Large Language Models, Multimodal, and Speech AI (Automatic Speech Recognition and Text-to-Speech)
https://docs.nvidia.com/nemo-framework/user-guide/latest/overview.html
Apache License 2.0
11.56k stars 2.42k forks source link

Not able to covert stt_en_contextnet_1024.nemo into riva format #2979

Closed aitalk closed 2 years ago

aitalk commented 2 years ago

Describe the bug

A clear and concise description of what the bug is.

Steps/Code to reproduce bug nemo2riva --out /servicemaker-dev/stt_en_contextnet_1024.riva /servicemaker-dev/stt_en_contextnet_1024.nemo nemo-toolkit 1.4.0 nemo2riva 1.6.0b0

Please list minimal steps or code snippet for us to be able to reproduce the bug.

A helpful guide on on how to craft a minimal bug report http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports.

Expected behavior

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

Environment overview (please complete the following information)

Environment details

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

Additional context

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

aitalk commented 2 years ago

tchModel Loaded schema file /opt/conda/lib/python3.8/site-packages/nemo2riva/validation_schemas/tts-exported-hifiganmodel.yaml for nemo.collections.tts.models.HifiGanModel W1009 20:08:48.735618 139622390986560 schema.py:134] Validation schema not found for nemo.collections.asr.models.EncDecRNNTBPEModel. That means Riva does not yet support a pipeline for this network and likely will not work with it. I1009 20:08:56.384190 139622390986560 artifacts.py:77] Retrieved artifacts: dict_keys(['381667021bf541b3ba51f4ffcdb351d5_tokenizer.vocab', '6b363832122c4c6f9ad547f524f28dd0_tokenizer.model', '87654c2ac2344772892de94eefc9f84a_vocab.txt', 'model_config.yaml']) I1009 20:08:56.409415 139622390986560 convert.py:77] nemo2riva.convert: converting /servicemaker-dev/stt_en_contextnet_1024.nemo to /servicemaker-dev/stt_en_contextnet_1024.riva using ONNX export format I1009 20:08:56.411128 139622390986560 cookbook.py:81] Exporting model with autocast=False [NeMo W 2021-10-09 20:08:56 export_utils:198] Swapped 0 modules [NeMo W 2021-10-09 20:08:56 conv_asr:73] Turned off 0 masked convolutions I1009 20:10:43.682684 139622390986560 asr_model.py:360] Replacing output state name states with ['output-states-1', 'output-states-2'] W1009 20:10:44.193920 139622390986560 asr_model.py:399] PyTorch Model has been significantly modified. In order to utilize model, delete this instance and create a new model. Traceback (most recent call last): File "/opt/conda/bin/nemo2riva", line 8, in sys.exit(nemo2riva()) File "/opt/conda/lib/python3.8/site-packages/nemo2riva/cli/nemo2riva.py", line 50, in nemo2riva Nemo2Riva(args) File "/opt/conda/lib/python3.8/site-packages/nemo2riva/convert.py", line 84, in Nemo2Riva cb.save(obj=model, save_path=riva_out, cfg=cfg) File "/opt/conda/lib/python3.8/site-packages/nemo2riva/cookbook.py", line 111, in save f.write(content) File "/opt/conda/lib/python3.8/contextlib.py", line 120, in exit next(self.gen) File "", line 327, in create File "", line 263, in save_to File "", line 34, in crc32_file FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpwg0_r21l/model_graph.onnx'

aitalk commented 2 years ago

root@2034be4914c2:/servicemaker-dev/riva_quickstart_v1.6.0-beta/x/nemo2riva/validation_schemas# ls -al total 52 drwxr-xr-x 2 root root 4096 Oct 9 20:13 . drwxr-xr-x 5 root root 166 Oct 9 20:13 .. -rw-rw-r-- 1 root root 793 Sep 29 23:38 asr-stt-exported-encdecctcmodel.yaml -rw-rw-r-- 1 root root 846 Sep 29 23:38 asr-stt-exported-encdectcmodelbpe.yaml -rw-rw-r-- 1 root root 1076 Sep 29 23:38 nlp-isc-exported-bert.yaml -rw-rw-r-- 1 root root 1091 Sep 29 23:38 nlp-isc-exported-megatron.yaml -rw-rw-r-- 1 root root 1077 Sep 29 23:38 nlp-pc-exported-bert.yaml -rw-rw-r-- 1 root root 968 Sep 29 23:38 nlp-qa-exported-bert.yaml -rw-rw-r-- 1 root root 983 Sep 29 23:38 nlp-qa-exported-megatron.yaml -rw-rw-r-- 1 root root 1067 Sep 29 23:38 nlp-tc-exported-bert.yaml -rw-rw-r-- 1 root root 1082 Sep 29 23:38 nlp-tc-exported-megatron.yaml -rw-rw-r-- 1 root root 1028 Sep 29 23:38 nlp-tkc-exported-bert.yaml -rw-rw-r-- 1 root root 684 Sep 29 23:38 tts-exported-fastpitchmodel.yaml -rw-rw-r-- 1 root root 766 Sep 29 23:38 tts-exported-hifiganmodel.yaml

titu1994 commented 2 years ago

No transducer model is supported in Riva at the moment.

aitalk commented 2 years ago

Ok, thanks. Any idea when it will be supported? I find contextNet models are little more accurate than other models so wanted to replace our current production setup with new contextnet models.

titu1994 commented 2 years ago

It will take time due to the major difference between CTC and RNNT models + decoding steps