patil-suraj / exploring-T5

A repo to explore different NLP tasks which can be solved using T5
169 stars 47 forks source link

AttributeError: can't set attribute #16

Open damlitos opened 1 year ago

damlitos commented 1 year ago

Hi,

I am having an issue about setting hyperparameters as below. I understand due to version change, that's not the way to give the parameters, however I couldn't figure out what to do. Any suggestions would be great.

class T5FineTuner(pl.LightningModule): def init(self, hparams): super(T5FineTuner, self).init()

 self.hparams = hparams

Cell In[163], line 5, in T5FineTuner.init(self, hparams) 2 def init(self, hparams): 3 super(T5FineTuner, self).init() ----> 5 self.hparams = hparams 7 self.adam_epsilon=1e-08 8 self.data_dir='aclImdb'

File ~/.local/lib/python3.8/site-packages/torch/nn/modules/module.py:1313, in Module.setattr(self, name, value) 1311 buffers[name] = value 1312 else: -> 1313 super().setattr(name, value)

AttributeError: can't set attribute