Skip to content

Commit fd9c479

Browse files
authored
Merge branch 'aws:master' into master
2 parents 94537be + ec89f7d commit fd9c479

File tree

305 files changed

+24146
-7128
lines changed

Some content is hidden

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

305 files changed

+24146
-7128
lines changed

.github/workflows/codeql.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: "CodeQL"
2+
on:
3+
push:
4+
branches: [ "master" ]
5+
pull_request:
6+
branches: [ "master" ]
7+
schedule:
8+
- cron: '30 15 * * *'
9+
jobs:
10+
analyze:
11+
name: Analyze (${{ matrix.language }})
12+
runs-on: ${{ 'ubuntu-latest' }}
13+
permissions:
14+
security-events: write
15+
packages: read
16+
17+
strategy:
18+
matrix:
19+
include:
20+
- language: python
21+
build-mode: none
22+
- language: java-kotlin
23+
build-mode: none
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6
27+
- name: Initialize CodeQL
28+
uses: github/codeql-action/init@4b1d7da102ff94aca014c0245062b1a463356d72
29+
with:
30+
languages: ${{ matrix.language }}
31+
build-mode: ${{ matrix.build-mode }}
32+
- name: Perform CodeQL Analysis
33+
uses: github/codeql-action/analyze@4b1d7da102ff94aca014c0245062b1a463356d72
34+
with:
35+
category: "/language:${{matrix.language}}"
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
name: Security Monitoring
2+
3+
on:
4+
schedule:
5+
- cron: '0 16 * * *'
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.run_id }}
9+
cancel-in-progress: true
10+
11+
permissions:
12+
id-token: write
13+
14+
jobs:
15+
check-code-scanning-alerts:
16+
runs-on: ubuntu-latest
17+
outputs:
18+
code_scanning_alert_status: ${{ steps.check-code-scanning-alerts.outputs.code_scanning_alert_status }}
19+
steps:
20+
- name: Check for security alerts
21+
id: check-code-scanning-alerts
22+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
23+
with:
24+
github-token: ${{ secrets.GH_PAT }}
25+
script: |
26+
async function checkAlerts() {
27+
const owner = '${{ github.repository_owner }}';
28+
const repo = '${{ github.event.repository.name }}';
29+
const ref = 'refs/heads/master';
30+
31+
const codeScanningAlerts = await github.rest.codeScanning.listAlertsForRepo({
32+
owner,
33+
repo,
34+
ref: ref
35+
});
36+
const activeCodeScanningAlerts = codeScanningAlerts.data.filter(alert => alert.state === 'open');
37+
core.setOutput('code_scanning_alert_status', activeCodeScanningAlerts.length > 0 ? '1': '0');
38+
}
39+
await checkAlerts();
40+
41+
check-dependabot-alerts:
42+
runs-on: ubuntu-latest
43+
outputs:
44+
dependabot_alert_status: ${{ steps.check-dependabot-alerts.outputs.dependabot_alert_status }}
45+
steps:
46+
- name: Check for dependabot alerts
47+
id: check-dependabot-alerts
48+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
49+
with:
50+
github-token: ${{ secrets.GH_PAT }}
51+
script: |
52+
async function checkAlerts() {
53+
const owner = '${{ github.repository_owner }}';
54+
const repo = '${{ github.event.repository.name }}';
55+
56+
const dependabotAlerts = await github.rest.dependabot.listAlertsForRepo({
57+
owner,
58+
repo,
59+
headers: {
60+
'accept': 'applications/vnd.github+json'
61+
}
62+
});
63+
const activeDependabotAlerts = dependabotAlerts.data.filter(alert => alert.state === 'open');
64+
core.setOutput('dependabot_alert_status', activeDependabotAlerts.length > 0 ? '1': '0');
65+
}
66+
await checkAlerts();
67+
68+
check-secret-scanning-alerts:
69+
runs-on: ubuntu-latest
70+
outputs:
71+
secret_scanning_alert_status: ${{ steps.check-secret-scanning-alerts.outputs.secret_scanning_alert_status }}
72+
steps:
73+
- name: Check for secret scanning alerts
74+
id: check-secret-scanning-alerts
75+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
76+
with:
77+
github-token: ${{ secrets.GH_PAT }}
78+
script: |
79+
async function checkAlerts() {
80+
const owner = '${{ github.repository_owner }}';
81+
const repo = '${{ github.event.repository.name }}';
82+
83+
const secretScanningAlerts = await github.rest.secretScanning.listAlertsForRepo({
84+
owner,
85+
repo,
86+
});
87+
const activeSecretScanningAlerts = secretScanningAlerts.data.filter(alert => alert.state === 'open');
88+
core.setOutput('secret_scanning_alert_status', activeSecretScanningAlerts.length > 0 ? '1': '0');
89+
}
90+
await checkAlerts();
91+
92+
put-metric-data:
93+
runs-on: ubuntu-latest
94+
needs: [check-code-scanning-alerts, check-dependabot-alerts, check-secret-scanning-alerts]
95+
steps:
96+
- name: Configure AWS Credentials
97+
uses: aws-actions/configure-aws-credentials@12e3392609eaaceb7ae6191b3f54bbcb85b5002b
98+
with:
99+
role-to-assume: ${{ secrets.MONITORING_ROLE_ARN }}
100+
aws-region: us-west-2
101+
- name: Put Code Scanning Alert Metric Data
102+
run: |
103+
if [ "${{ needs.check-code-scanning-alerts.outputs.code_scanning_alert_status }}" == "1" ]; then
104+
aws cloudwatch put-metric-data --metric-name CodeScanningAlert --namespace SecurityMonitoringMetrics --value 1 --unit Count --dimensions ProjectName=sagemaker-python-sdk
105+
else
106+
aws cloudwatch put-metric-data --metric-name CodeScanningAlert --namespace SecurityMonitoringMetrics --value 0 --unit Count --dimensions ProjectName=sagemaker-python-sdk
107+
fi
108+
- name: Put Dependabot Alert Metric Data
109+
run: |
110+
if [ "${{ needs.check-dependabot-alerts.outputs.dependabot_alert_status }}" == "1" ]; then
111+
aws cloudwatch put-metric-data --metric-name DependabotAlert --namespace SecurityMonitoringMetrics --value 1 --unit Count --dimensions ProjectName=sagemaker-python-sdk
112+
else
113+
aws cloudwatch put-metric-data --metric-name DependabotAlert --namespace SecurityMonitoringMetrics --value 0 --unit Count --dimensions ProjectName=sagemaker-python-sdk
114+
fi
115+
- name: Put Secret Scanning Alert Metric Data
116+
run: |
117+
if [ "${{ needs.check-secret-scanning-alerts.outputs.secret_scanning_alert_status }}" == "1" ]; then
118+
aws cloudwatch put-metric-data --metric-name SecretScanningAlert --namespace SecurityMonitoringMetrics --value 1 --unit Count --dimensions ProjectName=sagemaker-python-sdk
119+
else
120+
aws cloudwatch put-metric-data --metric-name SecretScanningAlert --namespace SecurityMonitoringMetrics --value 0 --unit Count --dimensions ProjectName=sagemaker-python-sdk
121+
fi

.pylintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ max-returns=6
384384
max-branches=12
385385

386386
# Maximum number of statements in function / method body
387-
max-statements=100
387+
max-statements=105
388388

389389
# Maximum number of parents for a class (see R0901).
390390
max-parents=7

CHANGELOG.md

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

3+
## v2.232.1 (2024-09-19)
4+
5+
### Bug Fixes and Other Changes
6+
7+
* update image_uri_configs 09-17-2024 07:17:54 PST
8+
* support latest container version in image_uris and DJLModel for lmi c…
9+
10+
## v2.232.0 (2024-09-12)
11+
12+
### Features
13+
14+
* add deployment config name in modelbuilder telemetry
15+
* add Clarify image URIs for us-isof
16+
17+
### Bug Fixes and Other Changes
18+
19+
* chore: add flaky test markers & skip region with low P3 instance capacity
20+
* update image_uri_configs 09-11-2024 11:54:11 PST
21+
* update image_uri_configs 09-10-2024 07:18:01 PST
22+
* [change] add us-gov and cn region repo accounts to djl and hugging face image metadata
23+
* update image_uri_configs 09-06-2024 07:17:55 PST
24+
* add us-gov region repo accounts to djl image metadata
25+
* pass name from modelbuilder constructor to created model
26+
27+
## v2.231.0 (2024-08-30)
28+
29+
### Features
30+
31+
* Add SageMaker Core to the dependency
32+
33+
### Bug Fixes and Other Changes
34+
35+
* Disable test_mnist_async
36+
* SMP v2.5
37+
* update image_uri_configs 08-29-2024 07:17:59 PST
38+
39+
## v2.230.0 (2024-08-28)
40+
41+
### Features
42+
43+
* FastAPI integration for In_Process Mode (2/2)
44+
45+
### Bug Fixes and Other Changes
46+
47+
* chore: add HF LLM neuronx 0.0.24 image
48+
* TF-2.16 test modification and handling
49+
* fix test fail
50+
* Add troubleshooting links to exceptions
51+
* cross account private hub model fine-tuning
52+
* chore: cleanup jumpstart factory
53+
* disable failing integration tests
54+
55+
## v2.229.0 (2024-08-15)
56+
57+
### Features
58+
59+
* Support for ModelBuilder In_Process Mode (1/2)
60+
* Pulling in dependencies (in_process mode) using conda environment
61+
* Add optional CodeArtifact login to FrameworkProcessing job script
62+
* implemented security-monitoring to send metrics to CW #1510
63+
64+
### Bug Fixes and Other Changes
65+
66+
* alt configs model deployment and training issues
67+
* fix keras extension in integ test
68+
* update image_uri_configs 08-13-2024 07:17:54 PST
69+
* trn1 instance family does not support volume size
70+
* Update model.py
71+
* removed log statement
72+
* update image_uri_configs 08-09-2024 07:18:00 PST
73+
* Added torchrun compatibility for distributet training across multiple GPUs in a single node (single instance)
74+
* BiasConfig type hint
75+
* add model monitor image accounts for ap-southeast-5 and eu-central-2
76+
* aligned UTC times with PST
77+
* ensure hpt jobs inherit tags from config
78+
* add JumpStart PDT and OSU regions
79+
* chore(deps): bump certifi in /src/sagemaker/serve/utils
80+
* Updates for DJL 0.29.0 release
81+
* chore(deps): bump apache-airflow from 2.9.2 to 2.9.3 in /requirements/extras
82+
* chore(deps): bump torch from 2.0.1 to 2.2.0 in /tests/data/serve_resources/mlflow/pytorch
83+
* avoided printing stack trace and escaped input
84+
* removing kwargs as this is breaking predictor_cls param for mode…
85+
86+
## v2.228.0 (2024-08-06)
87+
88+
### Features
89+
90+
* triton v24.05
91+
92+
### Bug Fixes and Other Changes
93+
94+
* chore: telemetry for deployment configs
95+
* censoring sensitive values from being logged
96+
* update image_uri_configs 08-05-2024 07:17:38 PST
97+
* enable uncompressed model artifacts upload to S3 for SAGEMAKER_ENDPOINT overwrite for TGI, TEI, MMS model servers
98+
* ModelReference deployment for Alt Configs models
99+
* Add optional typecheck for nullable parameters
100+
* Update package metadata
101+
* release TEI 1.4.0
102+
103+
## v2.227.0 (2024-07-30)
104+
105+
### Features
106+
107+
* added code scanning through CodeQL
108+
109+
### Bug Fixes and Other Changes
110+
111+
* Fixed cpu isntance type for the estimator register test
112+
* update image_uri_configs 07-29-2024 11:28:28 PST
113+
* avoid AccessDenied error for a while on SageMaker Studio wtih do…
114+
* SMP PT 2.3 Fix
115+
* chore: pin framework version in serverless inference tests
116+
* image uri in TGI 2.2.0 image
117+
* explicitly access enum member values to avoid Python version related regression
118+
* chore: add huggingface TGI 2.2.0 config
119+
* update image_uri_configs 07-22-2024 11:53:54 PST
120+
* update image_uri_configs 07-17-2024 07:17:38 PST
121+
* update image_uri_configs 07-16-2024 07:17:45 PST
122+
* add support for new regions
123+
124+
## v2.226.1 (2024-07-17)
125+
126+
## v2.226.0 (2024-07-12)
127+
128+
### Features
129+
130+
* Curated hub improvements
131+
* InferenceSpec support for MMS and testing
132+
133+
### Bug Fixes and Other Changes
134+
135+
* ModelBuilder not passing HF_TOKEN to model.
136+
* update image_uri_configs 07-10-2024 07:18:04 PST
137+
138+
## v2.225.0 (2024-07-10)
139+
140+
### Features
141+
142+
* model optimization
143+
144+
### Bug Fixes and Other Changes
145+
146+
* fix integ test
147+
* update uris for v1.1.1
148+
* update image_uri_configs 07-04-2024 07:17:24 PST
149+
150+
## v2.224.4 (2024-07-04)
151+
152+
### Bug Fixes and Other Changes
153+
154+
* allow for inf spec and server override to be passed
155+
156+
## v2.224.3 (2024-07-03)
157+
158+
### Bug Fixes and Other Changes
159+
160+
* Upgrade local dependencies
161+
* Improve docstrings for estimator tags
162+
163+
## v2.224.2 (2024-06-27)
164+
165+
### Bug Fixes and Other Changes
166+
167+
* Update DJLModel class for latest container releases
168+
* list_models() for python3.8
169+
170+
## v2.224.1 (2024-06-21)
171+
172+
### Bug Fixes and Other Changes
173+
174+
* JumpStart CuratedHub Launch
175+
* Update README.rst to show conda-forge version of SageMaker SDK
176+
* Update tox.ini
177+
* chore(deps): bump apache-airflow from 2.9.1 to 2.9.2 in /requirements/extras
178+
* Model server override logic
179+
180+
## v2.224.0 (2024-06-19)
181+
182+
### Features
183+
184+
* JumpStartModel attach
185+
186+
### Bug Fixes and Other Changes
187+
188+
* feat(sagemaker-mlflow): New features for SageMaker MLflow
189+
* Upgrading to PT 2.3 for release
190+
* chore: use ml.g5.2xlarge for integ test
191+
* Enable telemetry logging for Remote function
192+
* Fix Dependabot Issues - MLFlow Version
193+
3194
## v2.223.0 (2024-06-13)
4195

5196
### Features

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ recursive-include requirements *
88
include VERSION
99
include LICENSE.txt
1010
include README.rst
11+
include hatch_build.py
1112

1213
prune tests
1314

README.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ SageMaker Python SDK
1010
:target: https://pypi.python.org/pypi/sagemaker
1111
:alt: Latest Version
1212

13+
.. image:: https://img.shields.io/conda/vn/conda-forge/sagemaker-python-sdk.svg
14+
:target: https://anaconda.org/conda-forge/sagemaker-python-sdk
15+
:alt: Conda-Forge Version
16+
1317
.. image:: https://img.shields.io/pypi/pyversions/sagemaker.svg
1418
:target: https://pypi.python.org/pypi/sagemaker
1519
:alt: Supported Python Versions

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.223.1.dev0
1+
2.232.2.dev0

0 commit comments

Comments
 (0)