Skip to content

Commit 6b055d6

Browse files
authored
Merge branch 'master' into joinsource
2 parents 3d703c4 + ead0351 commit 6b055d6

27 files changed

+714
-67
lines changed

CHANGELOG.md

+16
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Changelog
22

3+
## v2.64.0 (2021-10-20)
4+
5+
### Deprecations and Removals
6+
7+
* warn for deprecation - Lambda model-predictor
8+
9+
### Features
10+
11+
* Add support for TF 2.5
12+
* Add a pre-push git hook
13+
14+
### Bug Fixes and Other Changes
15+
16+
* add s3_analysis_config_output_path field in DataConfig constructor
17+
* make marketplace jobnames random
18+
319
## v2.63.2 (2021-10-18)
420

521
### Bug Fixes and Other Changes

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.63.3.dev0
1+
2.64.1.dev0

src/sagemaker/clarify.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def __init__(
3131
self,
3232
s3_data_input_path,
3333
s3_output_path,
34+
s3_analysis_config_output_path=None,
3435
label=None,
3536
headers=None,
3637
features=None,
@@ -44,6 +45,9 @@ def __init__(
4445
Args:
4546
s3_data_input_path (str): Dataset S3 prefix/object URI.
4647
s3_output_path (str): S3 prefix to store the output.
48+
s3_analysis_config_output_path (str): S3 prefix to store the analysis_config output
49+
If this field is None, then the s3_output_path will be used
50+
to store the analysis_config output
4751
label (str): Target attribute of the model required by bias metrics (optional for SHAP)
4852
Specified as column name or index for CSV dataset, or as JSONPath for JSONLines.
4953
headers (list[str]): A list of column names in the input dataset.
@@ -67,6 +71,7 @@ def __init__(
6771
)
6872
self.s3_data_input_path = s3_data_input_path
6973
self.s3_output_path = s3_output_path
74+
self.s3_analysis_config_output_path = s3_analysis_config_output_path
7075
self.s3_data_distribution_type = s3_data_distribution_type
7176
self.s3_compression_type = s3_compression_type
7277
self.label = label
@@ -480,7 +485,7 @@ def _run(
480485
json.dump(analysis_config, f)
481486
s3_analysis_config_file = _upload_analysis_config(
482487
analysis_config_file,
483-
data_config.s3_output_path,
488+
data_config.s3_analysis_config_output_path or data_config.s3_output_path,
484489
self.sagemaker_session,
485490
kms_key,
486491
)

src/sagemaker/deprecations.py

+62
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,46 @@ def renamed_warning(phrase):
5050
_warn(f"{phrase} has been renamed")
5151

5252

53+
def deprecation_warn(name, date, msg=None):
54+
"""Raise a warning for soon to be deprecated feature in sagemaker>=2
55+
56+
Args:
57+
name (str): Name of the feature
58+
date (str): the date when the feature will be deprecated
59+
msg (str): the prefix phrase of the warning message.
60+
"""
61+
_warn(f"{name} will be deprecated on {date}.{msg}")
62+
63+
64+
def deprecation_warning(date, msg=None):
65+
"""Decorator for raising deprecation warning for a feature in sagemaker>=2
66+
67+
Args:
68+
date (str): the date when the feature will be deprecated
69+
msg (str): the prefix phrase of the warning message.
70+
71+
Usage:
72+
@deprecation_warning(msg="message", date="date")
73+
def sample_function():
74+
print("xxxx....")
75+
76+
@deprecation_warning(msg="message", date="date")
77+
class SampleClass():
78+
def __init__(self):
79+
print("xxxx....")
80+
81+
"""
82+
83+
def deprecate(obj):
84+
def wrapper(*args, **kwargs):
85+
deprecation_warn(obj.__name__, date, msg)
86+
return obj(*args, **kwargs)
87+
88+
return wrapper
89+
90+
return deprecate
91+
92+
5393
def renamed_kwargs(old_name, new_name, value, kwargs):
5494
"""Checks if the deprecated argument is in kwargs
5595
@@ -106,6 +146,28 @@ def func(*args, **kwargs): # pylint: disable=W0613
106146
return func
107147

108148

149+
def deprecated(obj):
150+
"""Decorator for raising deprecated warning for a feature in sagemaker>=2
151+
152+
Usage:
153+
@deprecated
154+
def sample_function():
155+
print("xxxx....")
156+
157+
@deprecated
158+
class SampleClass():
159+
def __init__(self):
160+
print("xxxx....")
161+
162+
"""
163+
164+
def wrapper(*args, **kwargs):
165+
removed_warning(obj.__name__)
166+
return obj(*args, **kwargs)
167+
168+
return wrapper
169+
170+
109171
def deprecated_function(func, name):
110172
"""Wrap a function with a deprecation warning.
111173

src/sagemaker/fw_utils.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"local_gpu",
6060
)
6161
SM_DATAPARALLEL_SUPPORTED_FRAMEWORK_VERSIONS = {
62-
"tensorflow": ["2.3", "2.3.1", "2.3.2", "2.4", "2.4.1"],
62+
"tensorflow": ["2.3", "2.3.1", "2.3.2", "2.4", "2.4.1", "2.4.3", "2.5", "2.5.0", "2.5.1"],
6363
"pytorch": ["1.6", "1.6.0", "1.7", "1.7.1", "1.8", "1.8.0", "1.8.1", "1.9", "1.9.0"],
6464
}
6565
SMDISTRIBUTED_SUPPORTED_STRATEGIES = ["dataparallel", "modelparallel"]
@@ -533,7 +533,7 @@ def _validate_smdataparallel_args(
533533
if "py3" not in py_version:
534534
err_msg += (
535535
f"Provided py_version {py_version} is not supported by smdataparallel.\n"
536-
"Please specify py_version=py3"
536+
"Please specify py_version>=py3"
537537
)
538538

539539
if err_msg:

src/sagemaker/image_uri_config/clarify.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
"us-east-1": "205585389593",
2626
"us-east-2": "211330385671",
2727
"us-west-1": "740489534195",
28-
"us-west-2": "306415355426"
28+
"us-west-2": "306415355426",
29+
"us-gov-west-1": "598674086554"
2930
},
3031
"repository": "sagemaker-clarify-processing"
3132
}

src/sagemaker/image_uri_config/ray-pytorch.json

+20
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,26 @@
2121
},
2222
"repository": "sagemaker-rl-ray-container",
2323
"tag_prefix": "ray-0.8.5-torch"
24+
},
25+
"1.6.0": {
26+
"py_versions": ["py36"],
27+
"registries": {
28+
"ap-northeast-1": "462105765813",
29+
"ap-northeast-2": "462105765813",
30+
"ap-south-1": "462105765813",
31+
"ap-southeast-1": "462105765813",
32+
"ap-southeast-2": "462105765813",
33+
"ca-central-1": "462105765813",
34+
"eu-central-1": "462105765813",
35+
"eu-west-1": "462105765813",
36+
"eu-west-2": "462105765813",
37+
"us-east-1": "462105765813",
38+
"us-east-2": "462105765813",
39+
"us-west-1": "462105765813",
40+
"us-west-2": "462105765813"
41+
},
42+
"repository": "sagemaker-rl-ray-container",
43+
"tag_prefix": "ray-1.6.0-torch"
2444
}
2545
}
2646
}

src/sagemaker/image_uri_config/ray-tensorflow.json

+20
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,26 @@
165165
},
166166
"repository": "sagemaker-rl-ray-container",
167167
"tag_prefix": "ray-0.8.5-tf"
168+
},
169+
"1.6.0": {
170+
"py_versions": ["py37"],
171+
"registries": {
172+
"ap-northeast-1": "462105765813",
173+
"ap-northeast-2": "462105765813",
174+
"ap-south-1": "462105765813",
175+
"ap-southeast-1": "462105765813",
176+
"ap-southeast-2": "462105765813",
177+
"ca-central-1": "462105765813",
178+
"eu-central-1": "462105765813",
179+
"eu-west-1": "462105765813",
180+
"eu-west-2": "462105765813",
181+
"us-east-1": "462105765813",
182+
"us-east-2": "462105765813",
183+
"us-west-1": "462105765813",
184+
"us-west-2": "462105765813"
185+
},
186+
"repository": "sagemaker-rl-ray-container",
187+
"tag_prefix": "ray-1.6.0-tf"
168188
}
169189
}
170190
}

0 commit comments

Comments
 (0)