Skip to content

Commit

Permalink
Fix tests to accommodate new PyTorch SobolEngine
Browse files Browse the repository at this point in the history
Summary:
Updates test to fix failures caused by pytorch/pytorch#49710
Removes the comparison against specifc sample values to be more robust in the
future (but retains the distributional tests)

Reviewed By: danielrjiang

Differential Revision: D26207258

fbshipit-source-id: 3838339d6674518385ee6cf37faa7f52dc3de9dc
  • Loading branch information
Balandat authored and facebook-github-bot committed Feb 3, 2021
1 parent 908ec57 commit e2d8820
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 208 deletions.
2 changes: 1 addition & 1 deletion test/optim/test_initializers.py
Expand Up @@ -159,7 +159,7 @@ def test_gen_batch_initial_conditions(self):
self.assertEqual(raw_samps.shape, expected_raw_samps_shape)

def test_gen_batch_initial_conditions_highdim(self):
d = 120
d = 2200 # 2200 * 10 (q) > 21201 (sobol max dim)
bounds = torch.stack([torch.zeros(d), torch.ones(d)])
for dtype in (torch.float, torch.double):
bounds = bounds.to(device=self.device, dtype=dtype)
Expand Down

0 comments on commit e2d8820

Please sign in to comment.