Improving pipeline tests (#12784)
* Proposal * Testing pipelines slightly better. - Overall same design - Metaclass to get proper different tests instead of subTest (not well supported by Pytest) - Added ANY meta object to make output checking more readable. - Skipping architectures either without tiny_config or without architecture. * Small fix. * Fixing the tests in case of None value. * Oups. * Rebased with more architectures. * Fixing reformer tests (no override anymore). * Adding more options for model tester config. Co-authored-by: Lysandre <lysandre.debut@reseau.eseo.fr>
This commit is contained in:
@@ -186,6 +186,11 @@ class ReformerModelTester:
|
||||
hash_seed=self.hash_seed,
|
||||
)
|
||||
|
||||
def get_pipeline_config(self):
|
||||
config = self.get_config()
|
||||
config.vocab_size = 100
|
||||
return config
|
||||
|
||||
def create_and_check_reformer_model(self, config, input_ids, input_mask, choice_labels):
|
||||
model = ReformerModel(config=config)
|
||||
model.to(torch_device)
|
||||
|
||||
Reference in New Issue
Block a user