File tree 3 files changed +6
-6
lines changed
3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -595,7 +595,7 @@ def __init__(
595
595
596
596
if not _region_supports_profiler (
597
597
self .sagemaker_session .boto_region_name
598
- ) or not _instance_type_supports_profiler (self .instance_type ):
598
+ ) or _instance_type_supports_profiler (self .instance_type ):
599
599
self .disable_profiler = True
600
600
601
601
self .profiler_rule_configs = None
Original file line number Diff line number Diff line change @@ -1077,8 +1077,8 @@ def _instance_type_supports_profiler(instance_type):
1077
1077
if isinstance (instance_type , str ):
1078
1078
match = re .match (r"^ml[\._]([a-z\d]+)\.?\w*$" , instance_type )
1079
1079
if match and match [1 ].startswith ("trn" ):
1080
- return False
1081
- return True
1080
+ return True
1081
+ return False
1082
1082
1083
1083
1084
1084
def validate_version_or_image_args (framework_version , py_version , image_uri ):
Original file line number Diff line number Diff line change @@ -1043,6 +1043,6 @@ def test_validate_unsupported_distributions_trainium_raises():
1043
1043
1044
1044
1045
1045
def test_instance_type_supports_profiler ():
1046
- assert fw_utils ._instance_type_supports_profiler ("ml.trn1.xlarge" ) is False
1047
- assert fw_utils ._instance_type_supports_profiler ("ml.m4.xlarge" ) is True
1048
- assert fw_utils ._instance_type_supports_profiler ("local" ) is True
1046
+ assert fw_utils ._instance_type_supports_profiler ("ml.trn1.xlarge" ) is True
1047
+ assert fw_utils ._instance_type_supports_profiler ("ml.m4.xlarge" ) is False
1048
+ assert fw_utils ._instance_type_supports_profiler ("local" ) is False
You can’t perform that action at this time.
0 commit comments