Skip to content

Commit f51a305

Browse files
authored
Merge branch 'master' into processing-job-codeartifact-support
2 parents cfe8139 + fbc484c commit f51a305

File tree

68 files changed

+3927
-372
lines changed

Some content is hidden

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

68 files changed

+3927
-372
lines changed

.github/workflows/codebuild-ci-health.yml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,4 @@ jobs:
8181
- name: Run Local Mode Tests
8282
uses: aws-actions/aws-codebuild-run-build@v1
8383
with:
84-
project-name: sagemaker-python-sdk-ci-health-localmode-tests
85-
notebook-tests:
86-
runs-on: ubuntu-latest
87-
steps:
88-
- name: Configure AWS Credentials
89-
uses: aws-actions/configure-aws-credentials@v4
90-
with:
91-
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
92-
aws-region: us-west-2
93-
role-duration-seconds: 10800
94-
- name: Run Notebook Tests
95-
uses: aws-actions/aws-codebuild-run-build@v1
96-
with:
97-
project-name: sagemaker-python-sdk-ci-health-notebook-tests
84+
project-name: sagemaker-python-sdk-ci-health-localmode-tests

.github/workflows/codebuild-ci.yml

Lines changed: 51 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: PR Checks
22
on:
33
pull_request_target:
4+
branches:
5+
- "master*"
46

57
concurrency:
68
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.head_ref }}
@@ -10,9 +12,39 @@ permissions:
1012
id-token: write # This is required for requesting the JWT
1113

1214
jobs:
13-
codestyle-doc-tests:
15+
collab-check:
16+
runs-on: ubuntu-latest
17+
outputs:
18+
approval-env: ${{ steps.collab-check.outputs.result }}
19+
steps:
20+
- name: Collaborator Check
21+
uses: actions/github-script@v7
22+
id: collab-check
23+
with:
24+
result-encoding: string
25+
script: |
26+
try {
27+
const res = await github.rest.repos.checkCollaborator({
28+
owner: context.repo.owner,
29+
repo: context.repo.repo,
30+
username: "${{ github.event.pull_request.user.login }}",
31+
});
32+
console.log("Verifed ${{ github.event.pull_request.user.login }} is a repo collaborator. Auto Approving PR Checks.")
33+
return res.status == "204" ? "auto-approve" : "manual-approval"
34+
} catch (error) {
35+
console.log("${{ github.event.pull_request.user.login }} is not a collaborator. Requiring Manual Approval to run PR Checks.")
36+
return "manual-approval"
37+
}
38+
wait-for-approval:
1439
runs-on: ubuntu-latest
40+
needs: [collab-check]
41+
environment: ${{ needs.collab-check.outputs.approval-env }}
1542
steps:
43+
- run: echo "Workflow Approved! Starting PR Checks."
44+
codestyle-doc-tests:
45+
runs-on: ubuntu-latest
46+
needs: [wait-for-approval]
47+
steps:
1648
- name: Configure AWS Credentials
1749
uses: aws-actions/configure-aws-credentials@v4
1850
with:
@@ -23,9 +55,10 @@ jobs:
2355
uses: aws-actions/aws-codebuild-run-build@v1
2456
with:
2557
project-name: sagemaker-python-sdk-ci-codestyle-doc-tests
26-
source-version-override: 'pr/${{ github.event.pull_request.number }}'
58+
source-version-override: 'refs/pull/${{ github.event.pull_request.number }}/head^{${{ github.event.pull_request.head.sha }}}'
2759
unit-tests:
2860
runs-on: ubuntu-latest
61+
needs: [wait-for-approval]
2962
strategy:
3063
fail-fast: false
3164
matrix:
@@ -41,8 +74,23 @@ jobs:
4174
uses: aws-actions/aws-codebuild-run-build@v1
4275
with:
4376
project-name: sagemaker-python-sdk-ci-unit-tests
44-
source-version-override: 'pr/${{ github.event.pull_request.number }}'
77+
source-version-override: 'refs/pull/${{ github.event.pull_request.number }}/head^{${{ github.event.pull_request.head.sha }}}'
4578
env-vars-for-codebuild: |
4679
PY_VERSION
4780
env:
4881
PY_VERSION: ${{ matrix.python-version }}
82+
integ-tests:
83+
runs-on: ubuntu-latest
84+
needs: [wait-for-approval]
85+
steps:
86+
- name: Configure AWS Credentials
87+
uses: aws-actions/configure-aws-credentials@v4
88+
with:
89+
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
90+
aws-region: us-west-2
91+
role-duration-seconds: 10800
92+
- name: Run Integ Tests
93+
uses: aws-actions/aws-codebuild-run-build@v1
94+
with:
95+
project-name: sagemaker-python-sdk-ci-integ-tests
96+
source-version-override: 'refs/pull/${{ github.event.pull_request.number }}/head^{${{ github.event.pull_request.head.sha }}}'

CHANGELOG.md

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

3+
## v2.215.0 (2024-04-12)
4+
5+
### Features
6+
7+
* JumpStart Gated Model Support in ModelBuilder Local Modes
8+
* Changes to support remote schema retrieval for task types (question-answering, fill-mask) and added e2e tests for both local and remote hf schema logic.
9+
* Upgrade smp to version 2.3.0
10+
11+
### Bug Fixes and Other Changes
12+
13+
* disable modelbuilder mlflow local integ tests
14+
* add integ-tests to codebuild-ci.yml
15+
* [Feat] Support MLflow Model Format Through ModelBuilder
16+
* Test SM PySDK Variations
17+
* typo in jumpstart manifest and refine tests
18+
* add kix to launched regions
19+
* Remove space specific business logic from Python SDK function to fetch execution role
20+
* Remove notebook tests from CI health check and the script
21+
322
## v2.214.3 (2024-04-04)
423

524
### Bug Fixes and Other Changes

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.214.4.dev0
1+
2.215.1.dev0
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
accelerate>=0.24.1,<=0.27.0
2+
sagemaker_schema_inference_artifacts>=0.0.5

src/sagemaker/estimator.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2434,6 +2434,7 @@ def start_new(cls, estimator, inputs, experiment_config):
24342434
"""
24352435
train_args = cls._get_train_args(estimator, inputs, experiment_config)
24362436

2437+
logger.debug("Train args after processing defaults: %s", train_args)
24372438
estimator.sagemaker_session.train(**train_args)
24382439

24392440
return cls(estimator.sagemaker_session, estimator._current_job_name)
@@ -2499,7 +2500,13 @@ def _get_train_args(cls, estimator, inputs, experiment_config):
24992500

25002501
# enable_network_isolation may be a pipeline variable place holder object
25012502
# which is parsed in execution time
2502-
if estimator.enable_network_isolation():
2503+
2504+
# Should be defaulted to False
2505+
train_args["enable_network_isolation"] = False
2506+
2507+
# Only change it if it's explicitly passed so the sagemaker config
2508+
# doesn't override the kwarg.
2509+
if estimator.enable_network_isolation() is not None:
25032510
train_args["enable_network_isolation"] = estimator.enable_network_isolation()
25042511

25052512
if estimator.max_retry_attempts is not None:

src/sagemaker/fw_utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@
142142
"2.1.0",
143143
"2.1.2",
144144
"2.2.0",
145+
"2.3.0",
145146
],
146147
}
147148

@@ -168,6 +169,7 @@
168169
"2.1.0",
169170
"2.1.2",
170171
"2.2.0",
172+
"2.3.0",
171173
]
172174

173175
TRAINIUM_SUPPORTED_DISTRIBUTION_STRATEGIES = ["torch_distributed"]

src/sagemaker/image_uri_config/huggingface-llm-neuronx.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,35 @@
151151
"container_version": {
152152
"inf2": "ubuntu22.04"
153153
}
154+
},
155+
"0.0.21": {
156+
"py_versions": [
157+
"py310"
158+
],
159+
"registries": {
160+
"ap-northeast-1": "763104351884",
161+
"ap-south-1": "763104351884",
162+
"ap-south-2": "772153158452",
163+
"ap-southeast-1": "763104351884",
164+
"ap-southeast-2": "763104351884",
165+
"ap-southeast-4": "457447274322",
166+
"eu-central-1": "763104351884",
167+
"eu-central-2": "380420809688",
168+
"eu-south-2": "503227376785",
169+
"eu-west-1": "763104351884",
170+
"eu-west-3": "763104351884",
171+
"il-central-1": "780543022126",
172+
"sa-east-1": "763104351884",
173+
"us-east-1": "763104351884",
174+
"us-east-2": "763104351884",
175+
"us-west-2": "763104351884",
176+
"ca-west-1": "204538143572"
177+
},
178+
"tag_prefix": "1.13.1-optimum0.0.21",
179+
"repository": "huggingface-pytorch-tgi-inference",
180+
"container_version": {
181+
"inf2": "ubuntu22.04"
182+
}
154183
}
155184
}
156185
}

src/sagemaker/image_uri_config/huggingface-llm.json

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"1.1": "1.1.0",
1212
"1.2": "1.2.0",
1313
"1.3": "1.3.3",
14-
"1.4": "1.4.2"
14+
"1.4": "1.4.5"
1515
},
1616
"versions": {
1717
"0.6.0": {
@@ -483,6 +483,53 @@
483483
"container_version": {
484484
"gpu": "cu121-ubuntu22.04"
485485
}
486+
},
487+
"1.4.5": {
488+
"py_versions": [
489+
"py310"
490+
],
491+
"registries": {
492+
"af-south-1": "626614931356",
493+
"il-central-1": "780543022126",
494+
"ap-east-1": "871362719292",
495+
"ap-northeast-1": "763104351884",
496+
"ap-northeast-2": "763104351884",
497+
"ap-northeast-3": "364406365360",
498+
"ap-south-1": "763104351884",
499+
"ap-south-2": "772153158452",
500+
"ap-southeast-1": "763104351884",
501+
"ap-southeast-2": "763104351884",
502+
"ap-southeast-3": "907027046896",
503+
"ap-southeast-4": "457447274322",
504+
"ca-central-1": "763104351884",
505+
"cn-north-1": "727897471807",
506+
"cn-northwest-1": "727897471807",
507+
"eu-central-1": "763104351884",
508+
"eu-central-2": "380420809688",
509+
"eu-north-1": "763104351884",
510+
"eu-west-1": "763104351884",
511+
"eu-west-2": "763104351884",
512+
"eu-west-3": "763104351884",
513+
"eu-south-1": "692866216735",
514+
"eu-south-2": "503227376785",
515+
"me-south-1": "217643126080",
516+
"me-central-1": "914824155844",
517+
"sa-east-1": "763104351884",
518+
"us-east-1": "763104351884",
519+
"us-east-2": "763104351884",
520+
"us-gov-east-1": "446045086412",
521+
"us-gov-west-1": "442386744353",
522+
"us-iso-east-1": "886529160074",
523+
"us-isob-east-1": "094389454867",
524+
"us-west-1": "763104351884",
525+
"us-west-2": "763104351884",
526+
"ca-west-1": "204538143572"
527+
},
528+
"tag_prefix": "2.1.1-tgi1.4.5",
529+
"repository": "huggingface-pytorch-tgi-inference",
530+
"container_version": {
531+
"gpu": "cu121-ubuntu22.04"
532+
}
486533
}
487534
}
488535
}

src/sagemaker/image_uri_config/pytorch-smp.json

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"version_aliases": {
77
"2.0": "2.0.1",
88
"2.1": "2.1.2",
9-
"2.2": "2.2.0"
9+
"2.2": "2.3.0",
10+
"2.2.0": "2.3.0"
1011
},
1112
"versions": {
1213
"2.0.1": {
@@ -83,6 +84,31 @@
8384
"us-west-2": "658645717510"
8485
},
8586
"repository": "smdistributed-modelparallel"
87+
},
88+
"2.3.0": {
89+
"py_versions": [
90+
"py310"
91+
],
92+
"registries": {
93+
"ap-northeast-1": "658645717510",
94+
"ap-northeast-2": "658645717510",
95+
"ap-northeast-3": "658645717510",
96+
"ap-south-1": "658645717510",
97+
"ap-southeast-1": "658645717510",
98+
"ap-southeast-2": "658645717510",
99+
"ca-central-1": "658645717510",
100+
"eu-central-1": "658645717510",
101+
"eu-north-1": "658645717510",
102+
"eu-west-1": "658645717510",
103+
"eu-west-2": "658645717510",
104+
"eu-west-3": "658645717510",
105+
"sa-east-1": "658645717510",
106+
"us-east-1": "658645717510",
107+
"us-east-2": "658645717510",
108+
"us-west-1": "658645717510",
109+
"us-west-2": "658645717510"
110+
},
111+
"repository": "smdistributed-modelparallel"
86112
}
87113
}
88114
}

0 commit comments

Comments
 (0)