Skip to content

Commit 87cbed1

Browse files
authored
Merge branch 'master' into PT113Release
2 parents bd281b8 + 20cffd6 commit 87cbed1

File tree

103 files changed

+10679
-347
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+10679
-347
lines changed

.flake8

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ application_import_names = sagemaker, tests
33
import-order-style = google
44
per-file-ignores =
55
tests/unit/test_tuner.py: F405
6+
src/sagemaker/config/config_schema.py: E501

CHANGELOG.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,74 @@
11
# Changelog
22

3+
## v2.150.0 (2023-04-26)
4+
5+
### Features
6+
7+
* Introduce TensorBoard app class
8+
9+
### Bug Fixes and Other Changes
10+
11+
* Update data wrangler images
12+
13+
## v2.149.0 (2023-04-25)
14+
15+
### Features
16+
17+
* Support TF2.12 SageMaker DLC
18+
19+
### Bug Fixes and Other Changes
20+
21+
* update the doc for Join function
22+
* change s3UploadMode of sagemaker clarify processing output for computer vision jobs.
23+
24+
### Documentation Changes
25+
26+
* Add Remote Function updates
27+
28+
## v2.148.0 (2023-04-20)
29+
30+
### Features
31+
32+
* [huggingface] Add `torch.distributed` support for Trainium and `torchrun`
33+
* Add PyTorch 2.0 to SDK
34+
35+
### Bug Fixes and Other Changes
36+
37+
* updating batch transform job in monitoring schedule
38+
39+
## v2.147.0 (2023-04-18)
40+
41+
### Features
42+
43+
* support different types of deletion mode
44+
45+
## v2.146.1 (2023-04-17)
46+
47+
### Bug Fixes and Other Changes
48+
49+
* skip failing tests temporarily
50+
* Added ml.p4d and ml.p4de as supported instances for DeepSpeed
51+
52+
### Documentation Changes
53+
54+
* Add Model Registry Model Collection
55+
56+
## v2.146.0 (2023-04-13)
57+
58+
### Features
59+
60+
* Add support for JSON model inputs for Clarify Processor
61+
62+
### Bug Fixes and Other Changes
63+
64+
* Feature/list collection
65+
* improve reliability of Run integration test
66+
* Add a comment that smdataparallel lib excludes tf 2.12 support
67+
68+
### Documentation Changes
69+
70+
* Update reference to load run method in documentation
71+
372
## v2.145.0 (2023-04-06)
473

574
### Features

README.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ To run the integration tests, the following prerequisites must be met
133133
1. AWS account credentials are available in the environment for the boto3 client to use.
134134
2. The AWS account has an IAM role named :code:`SageMakerRole`.
135135
It should have the AmazonSageMakerFullAccess policy attached as well as a policy with `the necessary permissions to use Elastic Inference <https://docs.aws.amazon.com/sagemaker/latest/dg/ei-setup.html>`__.
136+
3. To run remote_function tests, dummy ecr repo should be created. It can be created by running -
137+
:code:`aws ecr create-repository --repository-name remote-function-dummy-container`
136138

137139
We recommend selectively running just those integration tests you'd like to run. You can filter by individual test function names with:
138140

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.145.1.dev0
1+
2.150.1.dev0
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Model Collection
2+
----------------
3+
4+
.. automodule:: sagemaker.collection
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
8+

doc/experiments/sagemaker.experiments.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Run
77
.. autoclass:: sagemaker.experiments.Run
88
:members:
99

10-
.. automethod:: sagemaker.experiments.load_run
10+
.. automethod:: sagemaker.experiments.run.load_run
1111

1212
.. automethod:: sagemaker.experiments.list_runs
1313

doc/overview.rst

Lines changed: 71 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2021,6 +2021,32 @@ set default values for. For the full schema, see ``sagemaker.config.config_schem
20212021
    Tags:
20222022
    - Key: 'tag_key'
20232023
      Value: 'tag_value'
2024+
PythonSDK:
2025+
Modules:
2026+
RemoteFunction:
2027+
Dependencies: 'path/to/requirements.txt'
2028+
EnableInterContainerTrafficEncryption: true
2029+
EnvironmentVariables: {'EnvVarKey': 'EnvVarValue'}
2030+
ImageUri: '555555555555.dkr.ecr.us-west-2.amazonaws.com/my-image:latest'
2031+
IncludeLocalWorkDir: true
2032+
InstanceType: 'ml.m5.large'
2033+
JobCondaEnvironment: 'your_conda_env'
2034+
PreExecutionCommands:
2035+
- 'command_1'
2036+
- 'command_2'
2037+
PreExecutionScript: 'path/to/script.sh'
2038+
RoleArn: 'arn:aws:iam::555555555555:role/MyRole'
2039+
S3KmsKeyId: 'yourkmskeyid'
2040+
S3RootUri: 's3://my-bucket/my-project'
2041+
VpcConfig:
2042+
SecurityGroupIds:
2043+
- 'sg123'
2044+
Subnets:
2045+
- 'subnet-1234'
2046+
Tags:
2047+
- Key: 'tag_key'
2048+
Value: 'tag_value'
2049+
VolumeKmsKeyId: 'yourkmskeyid'
20242050
20252051
Configuration file locations
20262052
============================
@@ -2170,8 +2196,8 @@ types support setting defaults with a configuration file.
21702196
- Tags
21712197
- Enable inter-container traffic encryption
21722198
2173-
List of APIs supported
2174-
----------------------
2199+
List of APIs and SDK capabilities supported
2200+
-------------------------------------------
21752201
21762202
Default values for the supported parameters of these APIs apply to
21772203
all create and update calls for that API. For example, if a supported
@@ -2202,6 +2228,10 @@ configuration file.
22022228
Hyperparameter Tuning Job: Supported indirectly via ``TrainingJob`` API. While this API is not directly supported, it includes the training job definition as a parameter.
22032229
If you provide defaults for this parameter as part of the ``TrainingJob`` API, these defaults are also used for Hyperparameter Tuning Job.
22042230
2231+
The following goups of SDK capabilities support defaults with a configuration file.
2232+
2233+
- Remote Function ``@remote decorator``, ``RemoteExecutor```
2234+
22052235
Configuration file resolution
22062236
=============================
22072237
@@ -2413,6 +2443,45 @@ specifically the contents of ``'body': b'{...}`` .
24132443
'query_string': ..., 'method': 'POST', 'headers': {...}, 'body': b'{...}', 'url': 'https://api.sagemaker.us-west-2.amazonaws.com/',
24142444
'context': {...}}
24152445
2446+
2447+
************************************************************
2448+
Run Machine Learning code on SageMaker using remote function
2449+
************************************************************
2450+
2451+
You can integrate your local machine language (ML) code to run in a Amazon SageMaker Training job by wrapping
2452+
your code inside a @remote decorator as shown in the following code example.
2453+
2454+
.. code-block:: python
2455+
2456+
from sagemaker.remote_function import remote
2457+
import numpy as np
2458+
2459+
@remote(instance_type="ml.m5.large")
2460+
def matrix_multiply(a, b):
2461+
return np.matmul(a, b)
2462+
2463+
a = np.array([[1, 0],
2464+
[0, 1]])
2465+
b = np.array([1, 2])
2466+
2467+
assert (matrix_multiply(a, b) == np.array([1,2])).all()
2468+
2469+
The SageMaker Python SDK will automatically translate your existing workspace environment and any associated data
2470+
processing code and datasets into a SageMaker Training job that runs on the SageMaker Training platform.
2471+
You can also activate a persistent cache feature, which will further reduce job start up latency by caching previously
2472+
downloaded dependency packages. This reduction in job latency is greater than the reduction in latency from using
2473+
SageMaker managed warm pools alone. The following sections show you how to wrap your local ML code and tailor your
2474+
experience for your use case including customizing your environment and integrating with SageMaker Experiments.
2475+
2476+
See the `Run your local code as a SageMaker Training job <https://docs.aws.amazon.com/sagemaker/latest/dg/train-remote-decorator.html>`__ for detailed developer guide.
2477+
2478+
Follow is the API specification for methods and classes related to remote function feature.
2479+
2480+
.. toctree::
2481+
:maxdepth: 1
2482+
2483+
remote_function/sagemaker.remote_function.rst
2484+
24162485
***
24172486
FAQ
24182487
***
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Remote function classes and methods specification
2+
=================================================
3+
4+
5+
@remote decorator
6+
-----------------
7+
8+
.. automethod:: sagemaker.remote_function.client.remote
9+
10+
11+
RemoteExecutor
12+
--------------
13+
14+
.. autoclass:: sagemaker.remote_function.RemoteExecutor
15+
:members:
16+
17+
18+
Future
19+
------
20+
21+
.. autoclass:: sagemaker.remote_function.client.Future
22+
:members:
23+
24+
.. automethod:: sagemaker.remote_function.client.list_futures
25+
26+
.. automethod:: sagemaker.remote_function.client.get_future

requirements/extras/test_requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ sagemaker-experiments==0.1.35
2121
Jinja2==3.0.3
2222
pandas>=1.3.5,<1.5
2323
scikit-learn==1.0.2
24+
cloudpickle==2.2.1

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def read_requirements(filename):
4949
required_packages = [
5050
"attrs>=20.3.0,<23",
5151
"boto3>=1.26.28,<2.0",
52+
"cloudpickle==2.2.1",
5253
"google-pasta",
5354
"numpy>=1.9.0,<2.0",
5455
"protobuf>=3.1,<4.0",
@@ -62,6 +63,7 @@ def read_requirements(filename):
6263
"PyYAML==5.4.1",
6364
"jsonschema",
6465
"platformdirs",
66+
"tblib==1.7.0",
6567
]
6668

6769
# Specific use case dependencies

0 commit comments

Comments
 (0)