Skip to content

Commit

Permalink
Refactor to reflect that there are two regression tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jollyjonson committed Dec 10, 2023
1 parent c3222f9 commit 5178ca0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tests/test_frechet_audio_distance.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,16 +227,14 @@ def test_vggish_model_computes_correct_embeddings(self):
np.allclose(actual_embeddings, EXPECTED_EMBEDDING, atol=1e-6)
)

def test_fad_regression_test(self):
def test_another_fad_regression_test(self):
sample_rate = 16000
test_signals = self._generate_test_signals(sample_rate)
fad = FrechetAudioDistance(sample_rate)
fad.update_state(test_signals, test_signals + 0.1)
fad_value = fad.result().numpy()
diff, tolerance = (
np.abs(fad_value - REGRESSION_TEST_EXPECTED_VALUE),
2e-3,
)
diff = np.abs(fad_value - REGRESSION_TEST_EXPECTED_VALUE)
tolerance = 2e-3
self.assertLess(diff, tolerance)

def test_attempting_to_merge_states_raises(self):
Expand Down

0 comments on commit 5178ca0

Please sign in to comment.