Skip to content

Commit 2014266

Browse files
committed
fix: indent and format fix
1 parent c9c4800 commit 2014266

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

src/sagemaker/estimator.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -838,14 +838,14 @@ def _validate_and_set_debugger_configs(self):
838838
if region_supports_debugger:
839839
if self.debugger_hook_config in [None, {}]:
840840
self.debugger_hook_config = DebuggerHookConfig(s3_output_path=self.output_path)
841-
else:
842-
if self.debugger_hook_config is not False and self.debugger_hook_config:
843-
# when user set debugger config in a unsupported region
844-
raise ValueError(
845-
"Current region does not support debugger but debugger hook config is set!"
846-
)
847-
# disable debugger in unsupported regions
848-
self.debugger_hook_config = False
841+
else:
842+
if self.debugger_hook_config is not False and self.debugger_hook_config:
843+
# when user set debugger config in a unsupported region
844+
raise ValueError(
845+
"Current region does not support debugger but debugger hook config is set!"
846+
)
847+
# disable debugger in unsupported regions
848+
self.debugger_hook_config = False
849849

850850
def _prepare_debugger_rules(self):
851851
"""Set any necessary values in debugger rules, if they are provided."""

tests/unit/test_fw_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,7 @@ def test_region_supports_debugger_feature_returns_false_for_unsupported_regions(
560560
assert fw_utils._region_supports_debugger("eu-central-2") is False
561561
assert fw_utils._region_supports_debugger("us-gov-east-1") is False
562562

563+
563564
def test_warn_if_parameter_server_with_multi_gpu(caplog):
564565
instance_type = "ml.p2.8xlarge"
565566
distribution = {"parameter_server": {"enabled": True}}

0 commit comments

Comments
 (0)