TransformerSum icon indicating copy to clipboard operation
TransformerSum copied to clipboard

Found keys that are in the model state dict but not in the checkpoint

Open PeppaZH opened this issue 2 years ago • 2 comments

I'm glad to find such a good project. I tried running ExtractiveSummarizer.load_from_checkpoint(my_model_path, strict=False) and it triggers an error: UserWarning: Found keys that are in the model state dict but not in the checkpoint: ['word_embedding_model.embeddings.position_ids'] rank_zero_warn( I search for the previous issues to solve it , but still the error. Thanks !

PeppaZH avatar Feb 24 '22 08:02 PeppaZH

i aslo had such a problem ,have you solved it ?

YuMJie avatar Apr 25 '22 08:04 YuMJie

I'm glad to find such a good project. I tried running ExtractiveSummarizer.load_from_checkpoint(my_model_path, strict=False) and it triggers an error: UserWarning: Found keys that are in the model state dict but not in the checkpoint: ['word_embedding_model.embeddings.position_ids'] rank_zero_warn( I search for the previous issues to solve it , but still the error. Thanks !

you should create one CLASS ,the construct of which (such as the function and neural network) must be same as the one that you have saved as checkpoint before。eg. ExtractiveSummarizer is not a CLASS, instead of a instance

YuMJie avatar Apr 27 '22 07:04 YuMJie

I believe this is just a warning and can safely be ignored.

HHousen avatar Apr 16 '23 03:04 HHousen