Skip to content

Commit

Permalink
[fbsync] Mark Places365 and SBU download tests as xfail(#6389)
Browse files Browse the repository at this point in the history
Summary:
* disable download test for Places365

* add xfail test for broken download servers

* add more comments

* mark SBU download as failing

Reviewed By: datumbox

Differential Revision: D38824251

fbshipit-source-id: 0244e9377f0e029255eed4ed5c94673d2cfabf5c

Co-authored-by: Nicolas Hug <[email protected]>
  • Loading branch information
2 people authored and facebook-github-bot committed Aug 24, 2022
1 parent e8e42e1 commit 67bdb83
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions test/test_datasets_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,6 @@ def make_parametrize_kwargs(download_configs):
@pytest.mark.parametrize(
**make_parametrize_kwargs(
itertools.chain(
places365(),
caltech101(),
caltech256(),
cifar10(),
Expand All @@ -448,7 +447,6 @@ def make_parametrize_kwargs(download_configs):
omniglot(),
phototour(),
sbdataset(),
sbu(),
semeion(),
stl10(),
svhn(),
Expand All @@ -461,6 +459,31 @@ def make_parametrize_kwargs(download_configs):
)
)
def test_url_is_accessible(url, md5):
"""
If you see this test failing, find the offending dataset in the parametrization and move it to
``test_url_is_not_accessible`` and link an issue detailing the problem.
"""
retry(lambda: assert_url_is_accessible(url))


@pytest.mark.parametrize(
**make_parametrize_kwargs(
itertools.chain(
places365(), # https://github.com/pytorch/vision/issues/6268
sbu(), # https://github.com/pytorch/vision/issues/6390
)
)
)
@pytest.mark.xfail
def test_url_is_not_accessible(url, md5):
"""
As the name implies, this test is the 'inverse' of ``test_url_is_accessible``. Since the download servers are
beyond our control, some files might not be accessible for longer stretches of time. Still, we want to know if they
come back up, or if we need to remove the download functionality of the dataset for good.
If you see this test failing, find the offending dataset in the parametrization and move it to
``test_url_is_accessible``.
"""
retry(lambda: assert_url_is_accessible(url))


Expand Down

0 comments on commit 67bdb83

Please sign in to comment.