Unverified Commit 5b517e17 authored by Yih-Dar's avatar Yih-Dar Committed by GitHub
Browse files

Use small config for `OneFormerModelTest.test_model_with_labels` (#25383)



fix
Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
parent 9c7b7447
...@@ -285,7 +285,7 @@ torch_job = CircleCIJob( ...@@ -285,7 +285,7 @@ torch_job = CircleCIJob(
"pip install -U --upgrade-strategy eager git+https://github.com/huggingface/accelerate", "pip install -U --upgrade-strategy eager git+https://github.com/huggingface/accelerate",
], ],
parallelism=1, parallelism=1,
pytest_num_workers=6, pytest_num_workers=8,
) )
......
...@@ -332,13 +332,13 @@ class OneFormerModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCas ...@@ -332,13 +332,13 @@ class OneFormerModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCas
"pixel_values": torch.randn((2, 3, *size), device=torch_device), "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(), "task_inputs": torch.randint(high=self.model_tester.vocab_size, size=(2, 77), device=torch_device).long(),
"text_inputs": torch.randint( "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(), ).long(),
"mask_labels": torch.randn((2, 150, *size), device=torch_device), "mask_labels": torch.randn((2, 150, *size), device=torch_device),
"class_labels": torch.zeros(2, 150, device=torch_device).long(), "class_labels": torch.zeros(2, 150, device=torch_device).long(),
} }
config = OneFormerConfig() config = self.model_tester.get_config()
config.is_training = True config.is_training = True
model = OneFormerForUniversalSegmentation(config).to(torch_device) model = OneFormerForUniversalSegmentation(config).to(torch_device)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment