Skip to content

Fix DeformConv2d's autocast test flakiness #3060

Closed
@datumbox

Description

@datumbox

A series of recent unrelated PRs exposed the fact that DeformConv2d's autocast unit-test is flaky and it can fail if we hit a bad seed. To resolve the problem, PR #3032 introduced a temporary workaround that fixes the random_seed:

vision/test/test_ops.py

Lines 657 to 659 in 06ebee1

@unittest.skipIf(not torch.cuda.is_available(), "CUDA unavailable")
def test_autocast(self):
set_rng_seed(0)

The above is not a great solution. We should investigate and fix the problem properly by adjusting the unit-test.

To reproduce the issue, remove the set_rng_seed call from the test and rerun it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions