Skip failing tests due to dependencies (#19621)

This commit is contained in:
awaelchli 2024-03-13 02:03:57 +01:00 committed by GitHub
parent 096b063d6e
commit d2ab93e8a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 18 additions and 0 deletions

View File

@ -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."""

View File

@ -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",