Scatter dummies + skip pipeline tests (#13996)

* Scatter dummies + skip pipeline tests

* Add torch scatter to build docs
This commit is contained in:
Lysandre Debut
2021-10-14 15:30:27 -04:00
committed by GitHub
parent b65c389769
commit 5b317f7ea4
5 changed files with 94 additions and 73 deletions

View File

@@ -111,7 +111,12 @@ class PipelineTestCaseMeta(type):
tiny_config.is_encoder_decoder = False
if ModelClass.__name__.endswith("WithLMHead"):
tiny_config.is_decoder = True
model = ModelClass(tiny_config)
try:
model = ModelClass(tiny_config)
except ImportError as e:
self.skipTest(
f"Cannot run with {tiny_config} as the model requires a library that isn't installed: {e}"
)
if hasattr(model, "eval"):
model = model.eval()
if tokenizer_class is not None: