Ask-Anything icon indicating copy to clipboard operation
Ask-Anything copied to clipboard

AttributeError: 'LlamaForCausalLM' object has no attribute 'logger'

Open chuch1983 opened this issue 6 months ago • 1 comments

error log Traceback (most recent call last): File "/opt/conda/lib/python3.10/site-packages/peft/peft_model.py", line 288, in getattr return super().getattr(name) # defer to nn.Module's logic File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1265, in getattr raise AttributeError("'{}' object has no attribute '{}'".format( AttributeError: 'PeftModelForCausalLM' object has no attribute 'logger'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/opt/conda/lib/python3.10/site-packages/peft/tuners/lora.py", line 278, in getattr return super().getattr(name) # defer to nn.Module's logic File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1265, in getattr raise AttributeError("'{}' object has no attribute '{}'".format( AttributeError: 'LoraModel' object has no attribute 'logger'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/xiaobingding/Ask-Anything-main/video_chat2/tasks/train_it.py", line 218, in main(cfg) File "/home/xiaobingding/Ask-Anything-main/video_chat2/tasks/train_it.py", line 154, in main ) = setup_model( File "/opt/conda/lib/python3.10/site-packages/tasks/shared_utils.py", line 45, in setup_model model = model_cls(config=config.model) File "/opt/conda/lib/python3.10/site-packages/models/videochat2_it.py", line 151, in init self.llama_model.logger.info_trainable_parameters() File "/opt/conda/lib/python3.10/site-packages/peft/peft_model.py", line 290, in getattr return getattr(self.base_model, name) File "/opt/conda/lib/python3.10/site-packages/peft/tuners/lora.py", line 280, in getattr return getattr(self.model, name) File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1265, in getattr raise AttributeError("'{}' object has no attribute '{}'".format( AttributeError: 'LlamaForCausalLM' object has no attribute 'logger'

torch 1.13.0+cu117 torchvision 0.14.1+cu117

版本 报错

chuch1983 avatar Dec 18 '23 09:12 chuch1983