2323 python_deprecation_warning ,
2424 is_version_equal_or_higher ,
2525)
26- from sagemaker .pytorch . defaults import PYTORCH_VERSION , PYTHON_VERSION , LATEST_VERSION
26+ from sagemaker .pytorch import defaults
2727from sagemaker .pytorch .model import PyTorchModel
2828from sagemaker .vpc_utils import VPC_CONFIG_DEFAULT
2929
@@ -35,14 +35,14 @@ class PyTorch(Framework):
3535
3636 __framework_name__ = "pytorch"
3737
38- LATEST_VERSION = LATEST_VERSION
38+ LATEST_VERSION = defaults . LATEST_VERSION
3939
4040 def __init__ (
4141 self ,
4242 entry_point ,
4343 source_dir = None ,
4444 hyperparameters = None ,
45- py_version = PYTHON_VERSION ,
45+ py_version = defaults . PYTHON_VERSION ,
4646 framework_version = None ,
4747 image_name = None ,
4848 ** kwargs
@@ -103,8 +103,10 @@ def __init__(
103103 :class:`~sagemaker.estimator.EstimatorBase`.
104104 """
105105 if framework_version is None :
106- logger .warning (empty_framework_version_warning (PYTORCH_VERSION , self .LATEST_VERSION ))
107- self .framework_version = framework_version or PYTORCH_VERSION
106+ logger .warning (
107+ empty_framework_version_warning (defaults .PYTORCH_VERSION , self .LATEST_VERSION )
108+ )
109+ self .framework_version = framework_version or defaults .PYTORCH_VERSION
108110
109111 if "enable_sagemaker_metrics" not in kwargs :
110112 # enable sagemaker metrics for PT v1.3 or greater:
@@ -116,7 +118,9 @@ def __init__(
116118 )
117119
118120 if py_version == "py2" :
119- logger .warning (python_deprecation_warning (self .__framework_name__ ))
121+ logger .warning (
122+ python_deprecation_warning (self .__framework_name__ , defaults .LATEST_PY2_VERSION )
123+ )
120124
121125 self .py_version = py_version
122126
0 commit comments