def test_v1_7_0_deprecate_parameter_validation(): _soft_unimport_module("pytorch_lightning.core.decorators") with pytest.deprecated_call( match="Using `pytorch_lightning.core.decorators.parameter_validation` is deprecated in v1.5" ): from pytorch_lightning.core.decorators import parameter_validation # noqa: F401
def test_v1_4_0_deprecated_imports(): _soft_unimport_module('pytorch_lightning.utilities.argparse_utils') with pytest.deprecated_call(match='will be removed in v1.4'): from pytorch_lightning.utilities.argparse_utils import from_argparse_args # noqa: F811 F401 _soft_unimport_module('pytorch_lightning.utilities.model_utils') with pytest.deprecated_call(match='will be removed in v1.4'): from pytorch_lightning.utilities.model_utils import is_overridden # noqa: F811 F401 _soft_unimport_module('pytorch_lightning.utilities.warning_utils') with pytest.deprecated_call(match='will be removed in v1.4'): from pytorch_lightning.utilities.warning_utils import WarningCache # noqa: F811 F401 _soft_unimport_module('pytorch_lightning.utilities.xla_device_utils') with pytest.deprecated_call(match='will be removed in v1.4'): from pytorch_lightning.utilities.xla_device_utils import XLADeviceUtils # noqa: F811 F401
def test_v1_4_0_deprecated_imports(): _soft_unimport_module('pytorch_lightning.utilities.argparse_utils') with pytest.deprecated_call(match='will be removed in v1.4'): from pytorch_lightning.utilities.argparse_utils import _gpus_arg_default # noqa: F811 F401
def test_v2_0_0_deprecated_imports(): _soft_unimport_module("pytorch_lightning.utilities.argparse_utils") with pytest.deprecated_call(match="will be removed in v2.0"): from pytorch_lightning.utilities.argparse_utils import _gpus_arg_default # noqa: F401
def test_v1_6_0_deprecated_device_dtype_mixin_import(): _soft_unimport_module('pytorch_lightning.utilities.device_dtype_mixin') with pytest.deprecated_call(match='will be removed in v1.6'): from pytorch_lightning.utilities.device_dtype_mixin import DeviceDtypeModuleMixin # noqa: F811 F401
def test_v1_7_0_moved_get_memory_profile_and_get_gpu_memory_map(tmpdir): _soft_unimport_module("pytorch_lightning.core.memory") with pytest.deprecated_call(match="to `pytorch_lightning.utilities.memory` since v1.5"): from pytorch_lightning.core.memory import get_gpu_memory_map, get_memory_profile # noqa: F401
def test_v1_7_0_moved_model_summary_and_layer_summary(tmpdir): _soft_unimport_module("pytorch_lightning.core.memory") with pytest.deprecated_call(match="to `pytorch_lightning.utilities.model_summary` since v1.5"): from pytorch_lightning.core.memory import LayerSummary, ModelSummary # noqa: F401