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.5k stars 2.41k forks source link

AttributeError: 'dict' object has no attribute '_get_node_flag' #10055

Open syx11237744 opened 1 month ago

syx11237744 commented 1 month ago

File "/share//code//NeMo/examples/nlp/language_modeling/megatron_ckpt_to_nemo.py", line 245, in convert(local_rank, rank, world_size, args) File "/share//code//NeMo/examples/nlp/language_modeling/megatron_ckpt_to_nemo.py", line 198, in convert model = MegatronGPTModel.load_from_checkpoint(checkpoint_path, hparams_file=args.hparams_file, trainer=trainer) File "/usr/local/lib/python3.10/dist-packages/nemo/collections/nlp/models/nlp_model.py", line 380, in load_from_checkpoint model = ptl_load_state(cls, checkpoint, strict=strict, cfg=cfg, kwargs) File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/core/saving.py", line 144, in _load_state obj = cls(_cls_kwargs) File "/usr/local/lib/python3.10/dist-packages/nemo/collections/nlp/models/language_modeling/megatron_gpt_model.py", line 243, in init super().init(cfg, trainer=trainer, no_lm_init=True) File "/usr/local/lib/python3.10/dist-packages/nemo/collections/nlp/models/language_modeling/megatron_base_model.py", line 118, in init with open_dict(cfg): File "/usr/lib/python3.10/contextlib.py", line 135, in enter return next(self.gen) File "/usr/local/lib/python3.10/dist-packages/omegaconf/omegaconf.py", line 983, in open_dict prev_state = config._get_node_flag("struct") AttributeError: 'dict' object has no attribute '_get_node_flag'

Thanks.

ericharper commented 3 weeks ago

Could you add more details on how to reproduce this? We have a bug template which can be followed when creating the issue.