Skip to content

test_linalg.py not run in CI #45271

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
antocuni opened this issue Sep 24, 2020 · 1 comment
Closed

test_linalg.py not run in CI #45271

antocuni opened this issue Sep 24, 2020 · 1 comment
Assignees
Labels
module: tests Issues related to tests (not the torch.testing module) triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@antocuni
Copy link
Contributor

antocuni commented Sep 24, 2020

🐛 Bug

I think that test/test_linalg.py is never run by any CI build.
It is not listed inside test.run_tests.TESTS.

To Reproduce

I noticed because it fails on my machine:

_____ TestLinalgCPU.test_det_cpu_float64 _____

self = <test_linalg.TestLinalgCPU testMethod=test_det_cpu_float64>, device = 'cpu', dtype = torch.float64

    @skipCUDAIfNoMagma
    @skipCPUIfNoLapack
    @unittest.skipIf(not TEST_NUMPY, "NumPy not found")
    @dtypes(torch.double)
    def test_det(self, device, dtype):
        tensors = (
            torch.randn((2, 2), device=device, dtype=dtype),
            torch.randn((129, 129), device=device, dtype=dtype),
            torch.randn((3, 52, 52), device=device, dtype=dtype),
            torch.randn((4, 2, 26, 26), device=device, dtype=dtype))
    
    
        ops = (torch.det, torch.Tensor.det,
               torch.linalg.det)
        for t in tensors:
            expected = np.linalg.det(t.cpu().numpy())
            for op in ops:
                actual = op(t)
                self.assertEqual(actual, expected)
    
        # NOTE: det requires a 2D+ tensor
        t = torch.randn(1, device=device, dtype=dtype)
        with self.assertRaises(IndexError):
>           op(t)
E           RuntimeError: Tensor of matrices must have at least 2 dimensions.

test/test_linalg.py:60: RuntimeError
===== short test summary info =====

cc @mruberry @VitalyFedyunin

@antocuni antocuni added the module: tests Issues related to tests (not the torch.testing module) label Sep 24, 2020
@mruberry mruberry self-assigned this Sep 24, 2020
@mruberry mruberry added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Sep 24, 2020
@mruberry
Copy link
Collaborator

Thanks for reporting this issue, @antocuni. I think you're right. I'll fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: tests Issues related to tests (not the torch.testing module) triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants