NeMo icon indicating copy to clipboard operation
NeMo copied to clipboard

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

Open syx11237744 opened this issue 1 year ago • 1 comments

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.

syx11237744 avatar Aug 06 '24 13:08 syx11237744

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

ericharper avatar Aug 21 '24 17:08 ericharper

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Sep 21 '24 01:09 github-actions[bot]

This issue was closed because it has been inactive for 7 days since being marked as stale.

github-actions[bot] avatar Sep 28 '24 01:09 github-actions[bot]