Skip to content
This repository has been archived by the owner on Nov 21, 2022. It is now read-only.

Commit

Permalink
Add guard
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanNaren committed Oct 20, 2021
1 parent d5992b1 commit 328e225
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lightning_transformers/core/nlp/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,6 @@ def load_from_checkpoint(
):
model: HFTransformer = super().load_from_checkpoint(checkpoint_path, map_location, hparams_file, strict)
# update model with hf_pipeline_kwargs override
model._hf_pipeline_kwargs.update(hf_pipeline_kwargs)
if hf_pipeline_kwargs is not None:
model._hf_pipeline_kwargs.update(hf_pipeline_kwargs)
return model

0 comments on commit 328e225

Please sign in to comment.