Skip to content

Commit 56b552d

Browse files
twmoveonmeta-codesync[bot]
authored andcommitted
Delete four deletion-eligible ALBEF embedding tests (#551)
Summary: Pull Request resolved: #551 Oncall test cleanup for the `stl_multimodal` rotation. TestX flags these four tests in `tests/models/albef/test_albef.py` as eligible for deletion — all sit in `DISABLED_FAILING` trunk state with open `FAILURE` issues, well past the 60-day zero-value threshold: - `test_albef_image_embeddings` (`844425197297248`, `844425197101365`) - `test_albef_image_embeddings_momentum` (`562950220612232`, `844425197101313`) - `test_albef_multimodal_embeddings` (`844425197297177`, `844425197101408`) - `test_albef_multimodal_embeddings_momentum` (`562950220612287`, `281475243658978`) Each asserted a hard-coded 2x2x3 activation tensor to `atol=1e-4` against a seeded forward pass — golden values that drift whenever RNG or kernel behavior changes underneath them. Re-baselining numbers nobody has validated since they broke would restore a green signal without restoring any real assurance, so they are deleted instead. The `albef_model_output` fixture and the surrounding tests are untouched: `test_albef_text_embeddings` and `test_albef_text_embeddings_momentum` still exercise the same forward pass, and `test_similarity`, `test_neg_embeddings`, `test_dequeue_and_enqueue`, `test_momentum_update`, and `test_copy_params_momentum_models` still cover `ALBEFModelWithSimilarity`. ___ Differential Revision: D114397069 fbshipit-source-id: 59f0640bd04fb164d0c8b53665616ed64545da2b
1 parent 211c5bd commit 56b552d

1 file changed

Lines changed: 0 additions & 44 deletions

File tree

tests/models/albef/test_albef.py

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -79,26 +79,6 @@ def albef_model_output(albef_model):
7979
return albef_model(image, text, text_atts)
8080

8181

82-
def test_albef_image_embeddings(albef_model_output):
83-
expected = Tensor(
84-
[
85-
[[1.364883, -1.003092, -0.361791], [-0.634884, 1.411830, -0.776947]],
86-
[[1.401580, -0.537510, -0.864071], [1.378901, -0.417473, -0.961429]],
87-
]
88-
)
89-
assert_expected(albef_model_output.image_embeddings, expected, rtol=0, atol=1e-4)
90-
91-
92-
def test_albef_image_embeddings_momentum(albef_model_output):
93-
expected = Tensor(
94-
[
95-
[[1.364883, -1.003092, -0.361791], [-0.634884, 1.411830, -0.776947]],
96-
[[1.401580, -0.537510, -0.864070], [1.378902, -0.417473, -0.961429]],
97-
]
98-
)
99-
assert_expected(albef_model_output.image_embeddings_m, expected, rtol=0, atol=1e-4)
100-
101-
10282
def test_albef_text_embeddings(albef_model_output):
10383
expected = Tensor(
10484
[
@@ -119,30 +99,6 @@ def test_albef_text_embeddings_momentum(albef_model_output):
11999
assert_expected(albef_model_output.text_embeddings_m, expected, rtol=0, atol=1e-4)
120100

121101

122-
def test_albef_multimodal_embeddings(albef_model_output):
123-
expected = Tensor(
124-
[
125-
[[-0.068738, 1.257666, -1.188928], [1.409873, -0.609056, -0.800817]],
126-
[[-1.402520, 0.544084, 0.858435], [1.202279, -1.246038, 0.043760]],
127-
]
128-
)
129-
assert_expected(
130-
albef_model_output.multimodal_embeddings, expected, rtol=0, atol=1e-4
131-
)
132-
133-
134-
def test_albef_multimodal_embeddings_momentum(albef_model_output):
135-
expected = Tensor(
136-
[
137-
[[-0.068738, 1.257666, -1.188928], [1.409873, -0.609056, -0.800817]],
138-
[[-1.402520, 0.544084, 0.858435], [1.202279, -1.246038, 0.043760]],
139-
]
140-
)
141-
assert_expected(
142-
albef_model_output.multimodal_embeddings_m, expected, rtol=0, atol=1e-4
143-
)
144-
145-
146102
def test_copy_params_momentum_models():
147103
model = nn.Linear(3, 2)
148104
model_m = copy.deepcopy(model)

0 commit comments

Comments
 (0)