Different warning when load pre-trained Roberta Model

Hi everyone,


I have a question as follows. Why is there a different warning in the test like in the picture, even though I just changed the attribute’s name?
I made the code on google colab.

class TestModel1(RobertaPreTrainedModel):
  def __init__(self, config: RobertaConfig):
    super().__init__(config=config)
    self.roberta = RobertaModel(config)
    self.init_weights()
class TestModel2(RobertaPreTrainedModel):
  def __init__(self, config: RobertaConfig):
    super().__init__(config=config)
    self.my_name = RobertaModel(config)
    self.init_weights()

config = RobertaConfig.from_pretrained('roberta-base')
model1 = TestModel1.from_pretrained('roberta-base', config=config)
model2 = TestModel2.from_pretrained('roberta-base', config=config)

Thank you.