Elevate import deprecation warnings from DeprecationWarning to FutureWarning so messages are now seen

This commit is contained in:
Ross Wightman 2024-10-16 11:30:01 -07:00
parent a1f379e712
commit fad4538801
7 changed files with 7 additions and 7 deletions

View File

@ -1,4 +1,4 @@
from ._factory import *
import warnings
warnings.warn(f"Importing from {__name__} is deprecated, please import via timm.models", DeprecationWarning)
warnings.warn(f"Importing from {__name__} is deprecated, please import via timm.models", FutureWarning)

View File

@ -1,4 +1,4 @@
from ._features import *
import warnings
warnings.warn(f"Importing from {__name__} is deprecated, please import via timm.models", DeprecationWarning)
warnings.warn(f"Importing from {__name__} is deprecated, please import via timm.models", FutureWarning)

View File

@ -1,4 +1,4 @@
from ._features_fx import *
import warnings
warnings.warn(f"Importing from {__name__} is deprecated, please import via timm.models", DeprecationWarning)
warnings.warn(f"Importing from {__name__} is deprecated, please import via timm.models", FutureWarning)

View File

@ -4,4 +4,4 @@ from ._manipulate import *
from ._prune import *
import warnings
warnings.warn(f"Importing from {__name__} is deprecated, please import via timm.models", DeprecationWarning)
warnings.warn(f"Importing from {__name__} is deprecated, please import via timm.models", FutureWarning)

View File

@ -1,4 +1,4 @@
from ._hub import *
import warnings
warnings.warn(f"Importing from {__name__} is deprecated, please import via timm.models", DeprecationWarning)
warnings.warn(f"Importing from {__name__} is deprecated, please import via timm.models", FutureWarning)

View File

@ -45,4 +45,4 @@ from timm.layers.trace_utils import _assert, _float_to_int
from timm.layers.weight_init import trunc_normal_, trunc_normal_tf_, variance_scaling_, lecun_normal_
import warnings
warnings.warn(f"Importing from {__name__} is deprecated, please import via timm.layers", DeprecationWarning)
warnings.warn(f"Importing from {__name__} is deprecated, please import via timm.layers", FutureWarning)

View File

@ -1,4 +1,4 @@
from ._registry import *
import warnings
warnings.warn(f"Importing from {__name__} is deprecated, please import via timm.models", DeprecationWarning)
warnings.warn(f"Importing from {__name__} is deprecated, please import via timm.models", FutureWarning)