how to convert .pt models into .nemo format[Question] #2073
-
I have following blog Jump-start Training for Speech Recognition Models in Different Languages with NVIDIA NeMo and successfully finetune the model on my custom data. Now I have to test the models but in checkpoint directory I have 3 .pt files as output (JasperDecoderForCTC-STEP-80000.pt JasperEncoder-STEP-80000.pt trainer-STEP-80000.pt) I am confuse how would I convert them into .nemo format or is there any other way to use those models for inference. code : quartznet.py Also it will be helpful if anyone can share tutorial for finetuning on latest release |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 11 replies
-
We have completely changed NeMo since .11. We highly recommend to start using our latest stable version. Please see our User Guide: https://docs.nvidia.com/deeplearning/nemo/user-guide/docs/en/main/ and our Tutorials: https://docs.nvidia.com/deeplearning/nemo/user-guide/docs/en/main/starthere/tutorials.html for how to get started with NeMo. |
Beta Was this translation helpful? Give feedback.
-
@Ashbajawed Please let us know if it is still a blocker for you. Thanks. |
Beta Was this translation helpful? Give feedback.
-
Hi All, I still Have this issue. I have done transfer learning on confermer-ctc-model and I have ckpt files generated. But, I am unable to load them as they are not in .nemo format. So, How do I convert .ckpt to .nemo format. |
Beta Was this translation helpful? Give feedback.
-
Thanks, But, I am getting below error: When I tried to load as below: I have tried several ways such as os.join, Path(ckp) and many more to convert to os.PathLike object, but no luck. Please suggest. Thanks |
Beta Was this translation helpful? Give feedback.
-
Thanks.. I tried that also but it is giving the same error.. |
Beta Was this translation helpful? Give feedback.
-
Hi, Thanks for the response. code:import nemo Full Stack-Trace:TypeError Traceback (most recent call last) File ~/anaconda3/lib/python3.9/site-packages/nemo/core/classes/modelPT.py:336, in ModelPT.load_from_checkpoint(cls, checkpoint_path, map_location, hparams_file, strict, *args, **kwargs) File ~/anaconda3/lib/python3.9/site-packages/pytorch_lightning/core/saving.py:137, in ModelIO.load_from_checkpoint(cls, checkpoint_path, map_location, hparams_file, strict, **kwargs) File ~/anaconda3/lib/python3.9/site-packages/pytorch_lightning/core/saving.py:205, in _load_from_checkpoint(cls, checkpoint_path, map_location, hparams_file, strict, **kwargs) File ~/anaconda3/lib/python3.9/site-packages/pytorch_lightning/core/saving.py:250, in _load_state(cls, checkpoint, strict, cls_kwargs_new) File ~/anaconda3/lib/python3.9/site-packages/nemo/collections/asr/models/ctc_bpe_models.py:46, in EncDecCTCModelBPE.init(self, cfg, trainer) File ~/anaconda3/lib/python3.9/site-packages/nemo/collections/asr/parts/mixins/mixins.py:61, in ASRBPEMixin._setup_tokenizer(self, tokenizer_cfg) File ~/anaconda3/lib/python3.9/site-packages/nemo/collections/asr/parts/mixins/mixins.py:98, in ASRBPEMixin._setup_monolingual_tokenizer(self, tokenizer_cfg) File ~/anaconda3/lib/python3.9/site-packages/nemo/core/classes/modelPT.py:222, in ModelPT.register_artifact(self, config_path, src, verify_src_exists) File ~/anaconda3/lib/python3.9/site-packages/nemo/core/connectors/save_restore_connector.py:369, in SaveRestoreConnector.register_artifact(self, model, config_path, src, verify_src_exists) File ~/anaconda3/lib/python3.9/posixpath.py:76, in join(a, *p) TypeError: expected str, bytes or os.PathLike object, not NoneType |
Beta Was this translation helpful? Give feedback.
-
code: Error:AttributeError Traceback (most recent call last) AttributeError: module 'nemo.collections.nlp' has no attribute 'models' @titu1994 Could you please help me solve this error |
Beta Was this translation helpful? Give feedback.
We have completely changed NeMo since .11. We highly recommend to start using our latest stable version. Please see our User Guide: https://docs.nvidia.com/deeplearning/nemo/user-guide/docs/en/main/ and our Tutorials: https://docs.nvidia.com/deeplearning/nemo/user-guide/docs/en/main/starthere/tutorials.html for how to get started with NeMo.