Skip to content

Commit

Permalink
add additional logging to test failures to help catch flakey inducing…
Browse files Browse the repository at this point in the history
… point tests (#616)

Summary:
Pull Request resolved: #616

Can't replicate test failure even with the buck command, so just add some extra info to help catch failures in the future.

Reviewed By: crasanders

Differential Revision: D69138310

fbshipit-source-id: 916c3ece02169c1866318328cdd41cc3db392a0c
  • Loading branch information
JasonKChow authored and facebook-github-bot committed Feb 5, 2025
1 parent a0c9f20 commit 9556bcb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_points_allocators.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ def test_kmeans_allocator_allocate_inducing_points(self):

self.assertIs(model.inducing_point_method.last_allocator_used, KMeansAllocator)
inducing_points = model.variational_strategy.inducing_points
self.assertTrue(inducing_points.shape == (9, 2))
self.assertTrue(
inducing_points.shape == (9, 2), f"shape is {inducing_points.shape}"
)
# We made ints, so mod 1 should be 0s, so we know these were the original inputs
self.assertTrue(torch.all(inducing_points % 1 == 0))

Expand Down

0 comments on commit 9556bcb

Please sign in to comment.