Skip to content

Commit

Permalink
more comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastien Ehrhardt committed May 14, 2024
1 parent 59b1378 commit ff7dd32
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_modeling_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -3726,8 +3726,10 @@ def get_mean_reldiff(failcase, x, ref, atol, rtol):
for model_class in self.all_model_classes:
config, inputs_dict = self.model_tester.prepare_config_and_inputs_for_common()
model = model_class(config)
# FIXME: we deactivate boolean mask because pretrained models
# will not load the mask token
# FIXME: we deactivate boolean mask because models using "use_mask_token"
# as input to their constructor will create another `mask_token` attribute
# **only** if `use_mask_token` is `True`. For these models we will skip creating the attention
# mask. A simple fix would be to include it in the config.
deactivate_mask = "use_mask_token" in inspect.signature(model_class).parameters

is_encoder_decoder = model.config.is_encoder_decoder
Expand Down

0 comments on commit ff7dd32

Please sign in to comment.