File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/sagemaker/tensorflow/training_compiler Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 13
13
"""Configuration for the SageMaker Training Compiler."""
14
14
from __future__ import absolute_import
15
15
import logging
16
- from packaging import version
16
+ from packaging .specifiers import SpecifierSet
17
+ from packaging .version import Version
17
18
18
19
from sagemaker .training_compiler .config import TrainingCompilerConfig as BaseConfig
19
20
@@ -97,7 +98,9 @@ def validate(
97
98
super (TrainingCompilerConfig , cls ).validate (estimator )
98
99
99
100
if estimator .framework_version :
100
- if version .parse (estimator .framework_version ) < cls .MIN_SUPPORTED_VERSION :
101
+ if Version (estimator .framework_version ) in SpecifierSet (
102
+ f"< { cls .MIN_SUPPORTED_VERSION } "
103
+ ):
101
104
error_helper_string = (
102
105
"SageMaker Training Compiler only supports TensorFlow version "
103
106
">= {} but received {}"
You can’t perform that action at this time.
0 commit comments