Skip to content

Commit

Permalink
Fixing the pipeline tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Narsil committed Oct 4, 2021
1 parent 12a1dd9 commit 605725f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_pipelines_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ def gen_test(ModelClass, checkpoint, tiny_config, tokenizer_class, feature_extra
def test(self):
if ModelClass.__name__.endswith("ForCausalLM"):
tiny_config.is_encoder_decoder = False
if hasattr(tiny_config, "encoder_no_repeat_ngram_size"):
# specific for blenderbot which supports both decoder-only
# encoder/decoder but the test config only reflects
# encoder/decoder arch
tiny_config.encoder_no_repeat_ngram_size = 0
if ModelClass.__name__.endswith("WithLMHead"):
tiny_config.is_decoder = True
model = ModelClass(tiny_config)
Expand Down

0 comments on commit 605725f

Please sign in to comment.