|
1 | 1 | import unittest
|
2 |
| -from unittest.mock import patch, MagicMock |
3 | 2 | import torch
|
4 |
| -import warnings |
5 | 3 |
|
6 | 4 | import sys; sys.path.append('../')
|
7 | 5 |
|
@@ -32,20 +30,6 @@ def _test_encoder_forward(self, encoder, batch, expected_precision):
|
32 | 30 | self.assertTrue(output.shape[-1] == encoder.embedding_dim)
|
33 | 31 | print("\033[94m"+ f" {encoder.__class__.__name__} forward pass success with output shape {output.shape}" + "\033[0m")
|
34 | 32 |
|
35 |
| - def test_threads_encoder_initialization(self): |
36 |
| - sample_batch = { |
37 |
| - 'features': torch.randn(1, 100, 768), |
38 |
| - 'coords': torch.randn(1, 100, 2), |
39 |
| - } |
40 |
| - self._test_encoder_forward(ThreadsSlideEncoder(), sample_batch, torch.bfloat16) |
41 |
| - |
42 |
| - # def test_trilobite_encoder_initialization(self): |
43 |
| - # sample_batch = { |
44 |
| - # 'features': torch.randn(1, 100, 768), |
45 |
| - # 'coords': torch.randn(1, 100, 2), |
46 |
| - # } |
47 |
| - # self._test_encoder_forward(TrilobiteSlideEncoder(), sample_batch, torch.float16) |
48 |
| - |
49 | 33 | def test_prism_encoder_initialization(self):
|
50 | 34 | sample_batch = {
|
51 | 35 | 'features': torch.randn(1, 100, 2560),
|
@@ -79,13 +63,11 @@ def test_slide_encoder_factory_with_valid_names(self):
|
79 | 63 | print("\033[95m" + "Testing Slide Encoder Factory with valid names" + "\033[0m")
|
80 | 64 | # Test factory method for valid model names
|
81 | 65 | for model_name, expected_class in [
|
82 |
| - ('mean-conch-v15', MeanSlideEncoder), |
| 66 | + ('mean-conch_v15', MeanSlideEncoder), |
83 | 67 | ('mean-blahblah', MeanSlideEncoder),
|
84 | 68 | ('prism', PRISMSlideEncoder),
|
85 | 69 | ('chief', CHIEFSlideEncoder),
|
86 | 70 | ('gigapath', GigaPathSlideEncoder),
|
87 |
| - ('threads', ThreadsSlideEncoder), |
88 |
| - # ('trilobite==trimodal-200k-new_model==epoch101', TrilobiteSlideEncoder), |
89 | 71 | ('titan', TitanSlideEncoder),
|
90 | 72 | ]:
|
91 | 73 | encoder = encoder_factory(model_name)
|
|
0 commit comments