Skip to content

Commit 8c2f919

Browse files
author
Bryannah Hernandez
committed
merge
2 parents a4c5e4f + 182535a commit 8c2f919

File tree

23 files changed

+899
-50
lines changed

23 files changed

+899
-50
lines changed

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
pull_request:
66
branches: [ "master" ]
77
schedule:
8-
- cron: '30 8 * * *'
8+
- cron: '30 15 * * *'
99
jobs:
1010
analyze:
1111
name: Analyze (${{ matrix.language }})
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
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+
console.log("Active Secret Scanning Alerts", activeSecretScanningAlerts);
90+
}
91+
await checkAlerts();
92+
93+
put-metric-data:
94+
runs-on: ubuntu-latest
95+
needs: [check-code-scanning-alerts, check-dependabot-alerts, check-secret-scanning-alerts]
96+
steps:
97+
- name: Configure AWS Credentials
98+
uses: aws-actions/configure-aws-credentials@12e3392609eaaceb7ae6191b3f54bbcb85b5002b
99+
with:
100+
role-to-assume: ${{ secrets.MONITORING_ROLE_ARN }}
101+
aws-region: us-west-2
102+
- name: Put Code Scanning Alert Metric Data
103+
run: |
104+
if [ "${{ needs.check-code-scanning-alerts.outputs.code_scanning_alert_status }}" == "1" ]; then
105+
aws cloudwatch put-metric-data --metric-name CodeScanningAlert --namespace SecurityMonitoringMetrics --value 1 --unit Count --dimensions ProjectName=sagemaker-python-sdk
106+
else
107+
aws cloudwatch put-metric-data --metric-name CodeScanningAlert --namespace SecurityMonitoringMetrics --value 0 --unit Count --dimensions ProjectName=sagemaker-python-sdk
108+
fi
109+
- name: Put Dependabot Alert Metric Data
110+
run: |
111+
if [ "${{ needs.check-dependabot-alerts.outputs.dependabot_alert_status }}" == "1" ]; then
112+
aws cloudwatch put-metric-data --metric-name DependabotAlert --namespace SecurityMonitoringMetrics --value 1 --unit Count --dimensions ProjectName=sagemaker-python-sdk
113+
else
114+
aws cloudwatch put-metric-data --metric-name DependabotAlert --namespace SecurityMonitoringMetrics --value 0 --unit Count --dimensions ProjectName=sagemaker-python-sdk
115+
fi
116+
- name: Put Secret Scanning Alert Metric Data
117+
run: |
118+
if [ "${{ needs.check-secret-scanning-alerts.outputs.secret_scanning_alert_status }}" == "1" ]; then
119+
aws cloudwatch put-metric-data --metric-name SecretScanningAlert --namespace SecurityMonitoringMetrics --value 1 --unit Count --dimensions ProjectName=sagemaker-python-sdk
120+
else
121+
aws cloudwatch put-metric-data --metric-name SecretScanningAlert --namespace SecurityMonitoringMetrics --value 0 --unit Count --dimensions ProjectName=sagemaker-python-sdk
122+
fi

CHANGELOG.md

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

3+
## v2.228.0 (2024-08-06)
4+
5+
### Features
6+
7+
* triton v24.05
8+
9+
### Bug Fixes and Other Changes
10+
11+
* chore: telemetry for deployment configs
12+
* censoring sensitive values from being logged
13+
* update image_uri_configs 08-05-2024 07:17:38 PST
14+
* enable uncompressed model artifacts upload to S3 for SAGEMAKER_ENDPOINT overwrite for TGI, TEI, MMS model servers
15+
* ModelReference deployment for Alt Configs models
16+
* Add optional typecheck for nullable parameters
17+
* Update package metadata
18+
* release TEI 1.4.0
19+
320
## v2.227.0 (2024-07-30)
421

522
### Features

VERSION

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

requirements/extras/test_requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ awslogs==0.14.0
1313
black==24.3.0
1414
stopit==1.1.2
1515
# Update tox.ini to have correct version of airflow constraints file
16-
apache-airflow==2.9.2
16+
apache-airflow==2.9.3
1717
apache-airflow-providers-amazon==7.2.1
1818
attrs>=23.1.0,<24
1919
fabric==2.6.0

src/sagemaker/image_uri_config/djl-lmi.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,38 @@
33
"inference"
44
],
55
"versions": {
6+
"0.29.0": {
7+
"registries": {
8+
"af-south-1": "626614931356",
9+
"il-central-1": "780543022126",
10+
"ap-east-1": "871362719292",
11+
"ap-northeast-1": "763104351884",
12+
"ap-northeast-2": "763104351884",
13+
"ap-northeast-3": "364406365360",
14+
"ap-south-1": "763104351884",
15+
"ap-southeast-1": "763104351884",
16+
"ap-southeast-2": "763104351884",
17+
"ap-southeast-3": "907027046896",
18+
"ca-central-1": "763104351884",
19+
"cn-north-1": "727897471807",
20+
"cn-northwest-1": "727897471807",
21+
"eu-central-1": "763104351884",
22+
"eu-north-1": "763104351884",
23+
"eu-west-1": "763104351884",
24+
"eu-west-2": "763104351884",
25+
"eu-west-3": "763104351884",
26+
"eu-south-1": "692866216735",
27+
"me-south-1": "217643126080",
28+
"sa-east-1": "763104351884",
29+
"us-east-1": "763104351884",
30+
"us-east-2": "763104351884",
31+
"us-west-1": "763104351884",
32+
"us-west-2": "763104351884",
33+
"ca-west-1": "204538143572"
34+
},
35+
"repository": "djl-inference",
36+
"tag_prefix": "0.29.0-lmi11.0.0-cu124"
37+
},
638
"0.28.0": {
739
"registries": {
840
"af-south-1": "626614931356",

src/sagemaker/image_uri_config/djl-neuronx.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,24 @@
33
"inference"
44
],
55
"versions": {
6+
"0.29.0": {
7+
"registries": {
8+
"ap-northeast-1": "763104351884",
9+
"ap-south-1": "763104351884",
10+
"ap-southeast-1": "763104351884",
11+
"ap-southeast-2": "763104351884",
12+
"eu-central-1": "763104351884",
13+
"eu-west-1": "763104351884",
14+
"eu-west-3": "763104351884",
15+
"sa-east-1": "763104351884",
16+
"us-east-1": "763104351884",
17+
"us-east-2": "763104351884",
18+
"us-west-2": "763104351884",
19+
"ca-west-1": "204538143572"
20+
},
21+
"repository": "djl-inference",
22+
"tag_prefix": "0.29.0-neuronx-sdk2.19.1"
23+
},
624
"0.28.0": {
725
"registries": {
826
"ap-northeast-1": "763104351884",

src/sagemaker/image_uri_config/djl-tensorrtllm.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,38 @@
33
"inference"
44
],
55
"versions": {
6+
"0.29.0": {
7+
"registries": {
8+
"af-south-1": "626614931356",
9+
"il-central-1": "780543022126",
10+
"ap-east-1": "871362719292",
11+
"ap-northeast-1": "763104351884",
12+
"ap-northeast-2": "763104351884",
13+
"ap-northeast-3": "364406365360",
14+
"ap-south-1": "763104351884",
15+
"ap-southeast-1": "763104351884",
16+
"ap-southeast-2": "763104351884",
17+
"ap-southeast-3": "907027046896",
18+
"ca-central-1": "763104351884",
19+
"cn-north-1": "727897471807",
20+
"cn-northwest-1": "727897471807",
21+
"eu-central-1": "763104351884",
22+
"eu-north-1": "763104351884",
23+
"eu-west-1": "763104351884",
24+
"eu-west-2": "763104351884",
25+
"eu-west-3": "763104351884",
26+
"eu-south-1": "692866216735",
27+
"me-south-1": "217643126080",
28+
"sa-east-1": "763104351884",
29+
"us-east-1": "763104351884",
30+
"us-east-2": "763104351884",
31+
"us-west-1": "763104351884",
32+
"us-west-2": "763104351884",
33+
"ca-west-1": "204538143572"
34+
},
35+
"repository": "djl-inference",
36+
"tag_prefix": "0.29.0-tensorrtllm0.11.0-cu124"
37+
},
638
"0.28.0": {
739
"registries": {
840
"af-south-1": "626614931356",

src/sagemaker/jumpstart/constants.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,16 @@
182182
content_bucket="jumpstart-cache-prod-il-central-1",
183183
gated_content_bucket="jumpstart-private-cache-prod-il-central-1",
184184
),
185+
JumpStartLaunchedRegionInfo(
186+
region_name="us-gov-east-1",
187+
content_bucket="jumpstart-cache-prod-us-gov-east-1",
188+
gated_content_bucket="jumpstart-private-cache-prod-us-gov-east-1",
189+
),
190+
JumpStartLaunchedRegionInfo(
191+
region_name="us-gov-west-1",
192+
content_bucket="jumpstart-cache-prod-us-gov-west-1",
193+
gated_content_bucket="jumpstart-private-cache-prod-us-gov-west-1",
194+
),
185195
]
186196
)
187197

src/sagemaker/model.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1377,6 +1377,7 @@ def deploy(
13771377
managed_instance_scaling: Optional[str] = None,
13781378
inference_component_name=None,
13791379
routing_config: Optional[Dict[str, Any]] = None,
1380+
model_reference_arn: Optional[str] = None,
13801381
**kwargs,
13811382
):
13821383
"""Deploy this ``Model`` to an ``Endpoint`` and optionally return a ``Predictor``.
@@ -1483,6 +1484,8 @@ def deploy(
14831484
{
14841485
"RoutingStrategy": sagemaker.enums.RoutingStrategy.RANDOM
14851486
}
1487+
model_reference_arn (Optional [str]): Hub Content Arn of a Model Reference type
1488+
content (default: None).
14861489
Raises:
14871490
ValueError: If arguments combination check failed in these circumstances:
14881491
- If no role is specified or
@@ -1697,7 +1700,8 @@ def deploy(
16971700
accelerator_type=accelerator_type,
16981701
tags=tags,
16991702
serverless_inference_config=serverless_inference_config,
1700-
**kwargs,
1703+
accept_eula=accept_eula,
1704+
model_reference_arn=model_reference_arn,
17011705
)
17021706
serverless_inference_config_dict = (
17031707
serverless_inference_config._to_request_dict() if is_serverless else None

0 commit comments

Comments
 (0)