File tree 2 files changed +16
-8
lines changed
tensorflow/training_compiler
2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,10 @@ def validate(
99
99
if estimator .framework_version :
100
100
if version .parse (estimator .framework_version ) < cls .MIN_SUPPORTED_VERSION :
101
101
error_helper_string = (
102
- f"SageMaker Training Compiler only supports TensorFlow version "
103
- f">= { cls .MIN_SUPPORTED_VERSION } but received { estimator .framework_version } "
102
+ "SageMaker Training Compiler only supports TensorFlow version "
103
+ ">= {} but received {}"
104
+ )
105
+ error_helper_string = error_helper_string .format (
106
+ cls .MIN_SUPPORTED_VERSION , estimator .framework_version
104
107
)
105
108
raise ValueError (error_helper_string )
Original file line number Diff line number Diff line change @@ -153,8 +153,9 @@ def validate(
153
153
elif estimator .instance_type == "local" :
154
154
error_helper_string = (
155
155
"The local mode is not supported by SageMaker Training Compiler."
156
- f "It only supports the following GPU instances: { cls . SUPPORTED_INSTANCE_CLASS_PREFIXES } . "
156
+ "It only supports the following GPU instances: {} "
157
157
)
158
+ error_helper_string = error_helper_string .format (cls .SUPPORTED_INSTANCE_CLASS_PREFIXES )
158
159
raise ValueError (error_helper_string )
159
160
160
161
if estimator .distribution and "smdistributed" in estimator .distribution :
@@ -164,9 +165,13 @@ def validate(
164
165
)
165
166
166
167
if estimator .debugger_hook_config or (not estimator .disable_profiler ):
167
- logger .warning (
168
- f"Using Debugger and/or Profiler with SageMaker Training Compiler causes poor "
169
- f"performance. Found debugger_hook_config={ estimator .debugger_hook_config } "
170
- f"disable_profiler={ estimator .disable_profiler } . Please set "
171
- f"debugger_hook_config=None and disable_profiler=True for optimal performance."
168
+ helper_string = (
169
+ "Using Debugger and/or Profiler with SageMaker Training Compiler causes poor "
170
+ "performance. Found debugger_hook_config={} "
171
+ "disable_profiler={}. Please set "
172
+ "debugger_hook_config=None and disable_profiler=True for optimal performance."
173
+ )
174
+ helper_string = helper_string .format (
175
+ estimator .debugger_hook_config , estimator .disable_profiler
172
176
)
177
+ logger .warning (helper_string )
You can’t perform that action at this time.
0 commit comments