in src/sagemaker/estimator.py [0:0]
def _validate_and_set_debugger_configs(self):
"""Set defaults for debugging."""
if self.debugger_hook_config is None and _region_supports_debugger(
self.sagemaker_session.boto_region_name
):
self.debugger_hook_config = DebuggerHookConfig(s3_output_path=self.output_path)
elif not self.debugger_hook_config:
# set hook config to False if _region_supports_debugger is False
self.debugger_hook_config = False
# Disable debugger if checkpointing is enabled by the customer
if self.checkpoint_s3_uri and self.checkpoint_local_path and self.debugger_hook_config:
if self._framework_name in {"mxnet", "pytorch", "tensorflow"}:
if self.instance_count > 1 or (
hasattr(self, "distribution")
and self.distribution is not None # pylint: disable=no-member
):
logger.info(
"SMDebug Does Not Currently Support \
Distributed Training Jobs With Checkpointing Enabled"
)
self.debugger_hook_config = False
if self.debugger_hook_config is False:
if self.environment is None:
self.environment = {}
self.environment[DEBUGGER_FLAG] = "0"