Skip to content

Commit

Permalink
Use save_hyperparameters instead of 'self.hparams = hparams'
Browse files Browse the repository at this point in the history
  • Loading branch information
HHousen committed May 11, 2021
1 parent b2d81af commit e36e033
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/abstractive.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class AbstractiveSummarizer(pl.LightningModule):
def __init__(self, hparams):
super(AbstractiveSummarizer, self).__init__()

self.hparams = hparams
self.save_hyperparameters(hparams)

if len(self.hparams.dataset) <= 1:
self.hparams.dataset = self.hparams.dataset[0]
Expand Down
2 changes: 1 addition & 1 deletion src/extractive.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def __init__(self, hparams, embedding_model_config=None, classifier_obj=None):
hparams.tokenizer_no_use_fast = getattr(hparams, "tokenizer_no_use_fast", False)
hparams.data_type = getattr(hparams, "data_type", "none")

self.hparams = hparams
self.save_hyperparameters(hparams)
self.forward_modify_inputs_callback = None

if not embedding_model_config:
Expand Down

0 comments on commit e36e033

Please sign in to comment.