diff --git a/tests/tests_pytorch/models/test_hparams.py b/tests/tests_pytorch/models/test_hparams.py index 25c09b8e0b..254b43cbc8 100644 --- a/tests/tests_pytorch/models/test_hparams.py +++ b/tests/tests_pytorch/models/test_hparams.py @@ -15,6 +15,7 @@ import copy import functools import os import pickle +import sys from argparse import Namespace from dataclasses import dataclass from enum import Enum @@ -43,6 +44,8 @@ if _OMEGACONF_AVAILABLE: from omegaconf import Container, OmegaConf from omegaconf.dictconfig import DictConfig +_PYTHON_GREATER_EQUAL_3_9_0 = (sys.version_info.major, sys.version_info.minor) >= (3, 9) + class SaveHparamsModel(BoringModel): """Tests that a model can take an object.""" @@ -697,6 +700,14 @@ def test_model_with_fsspec_as_parameter(tmpdir): trainer.test() +@pytest.mark.xfail( + # AttributeError: 'OrphanPath' object has no attribute 'exists' + # Issue with `importlib_resources>=6.2.0` + raises=AttributeError, + condition=(not _PYTHON_GREATER_EQUAL_3_9_0), + reason="Issue with `importlib_resources`", + strict=False, +) @pytest.mark.skipif(RequirementCache("hydra-core<1.1"), reason="Requires Hydra's Compose API") def test_model_save_hyper_parameters_interpolation_with_hydra(tmpdir): """This test relies on configuration saved under tests/models/conf/config.yaml.""" diff --git a/tests/tests_pytorch/test_cli.py b/tests/tests_pytorch/test_cli.py index 95ed716801..e7771f10d0 100644 --- a/tests/tests_pytorch/test_cli.py +++ b/tests/tests_pytorch/test_cli.py @@ -1534,6 +1534,13 @@ def test_comet_logger_init_args(): ) +@pytest.mark.xfail( + # Only on Windows: TypeError: 'NoneType' object is not subscriptable + raises=TypeError, + condition=(sys.platform == "win32"), + strict=False, + reason="TypeError on Windows when parsing", +) def test_neptune_logger_init_args(): _test_logger_init_args( "NeptuneLogger",