Skip to content

Commit 67bdb83

Browse files
NicolasHugfacebook-github-bot
authored andcommitted
[fbsync] Mark Places365 and SBU download tests as xfail(#6389)
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 <contact@nicolas-hug.com>
1 parent e8e42e1 commit 67bdb83

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

test/test_datasets_download.py

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,6 @@ def make_parametrize_kwargs(download_configs):
433433
@pytest.mark.parametrize(
434434
**make_parametrize_kwargs(
435435
itertools.chain(
436-
places365(),
437436
caltech101(),
438437
caltech256(),
439438
cifar10(),
@@ -448,7 +447,6 @@ def make_parametrize_kwargs(download_configs):
448447
omniglot(),
449448
phototour(),
450449
sbdataset(),
451-
sbu(),
452450
semeion(),
453451
stl10(),
454452
svhn(),
@@ -461,6 +459,31 @@ def make_parametrize_kwargs(download_configs):
461459
)
462460
)
463461
def test_url_is_accessible(url, md5):
462+
"""
463+
If you see this test failing, find the offending dataset in the parametrization and move it to
464+
``test_url_is_not_accessible`` and link an issue detailing the problem.
465+
"""
466+
retry(lambda: assert_url_is_accessible(url))
467+
468+
469+
@pytest.mark.parametrize(
470+
**make_parametrize_kwargs(
471+
itertools.chain(
472+
places365(), # https://github.com/pytorch/vision/issues/6268
473+
sbu(), # https://github.com/pytorch/vision/issues/6390
474+
)
475+
)
476+
)
477+
@pytest.mark.xfail
478+
def test_url_is_not_accessible(url, md5):
479+
"""
480+
As the name implies, this test is the 'inverse' of ``test_url_is_accessible``. Since the download servers are
481+
beyond our control, some files might not be accessible for longer stretches of time. Still, we want to know if they
482+
come back up, or if we need to remove the download functionality of the dataset for good.
483+
484+
If you see this test failing, find the offending dataset in the parametrization and move it to
485+
``test_url_is_accessible``.
486+
"""
464487
retry(lambda: assert_url_is_accessible(url))
465488

466489

0 commit comments

Comments
 (0)