Skip to content

Commit

Permalink
Merge branch 'main' into xai-inverse-estimation
Browse files Browse the repository at this point in the history
  • Loading branch information
annahedstroem authored Mar 24, 2024
2 parents 9b1de09 + e381373 commit 3ec97cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion quantus/helpers/model/pytorch_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def _get_model_with_linear_top(self) -> torch.nn:

def _obtain_predictions(self, x, model_predict_kwargs):
pred = None
if isinstance(self.model, PreTrainedModel):
if PreTrainedModel is not None and isinstance(self.model, PreTrainedModel):
# BatchEncoding is the default output from Tokenizers which contains
# necessary keys such as `input_ids` and `attention_mask`.
# It is also possible to pass a Dict with those keys.
Expand Down

0 comments on commit 3ec97cc

Please sign in to comment.