Use small config for `OneFormerModelTest.test_model_with_labels` (#25383)
fix Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
parent
9c7b744795
commit
5b517e1764
|
@ -285,7 +285,7 @@ torch_job = CircleCIJob(
|
|||
"pip install -U --upgrade-strategy eager git+https://github.com/huggingface/accelerate",
|
||||
],
|
||||
parallelism=1,
|
||||
pytest_num_workers=6,
|
||||
pytest_num_workers=8,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -332,13 +332,13 @@ class OneFormerModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCas
|
|||
"pixel_values": torch.randn((2, 3, *size), device=torch_device),
|
||||
"task_inputs": torch.randint(high=self.model_tester.vocab_size, size=(2, 77), device=torch_device).long(),
|
||||
"text_inputs": torch.randint(
|
||||
high=self.model_tester.vocab_size, size=(2, 134, 77), device=torch_device
|
||||
high=self.model_tester.vocab_size, size=(2, 6, 77), device=torch_device
|
||||
).long(),
|
||||
"mask_labels": torch.randn((2, 150, *size), device=torch_device),
|
||||
"class_labels": torch.zeros(2, 150, device=torch_device).long(),
|
||||
}
|
||||
|
||||
config = OneFormerConfig()
|
||||
config = self.model_tester.get_config()
|
||||
config.is_training = True
|
||||
|
||||
model = OneFormerForUniversalSegmentation(config).to(torch_device)
|
||||
|
|
Loading…
Reference in New Issue