Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change: bump jinja2 to 3.1.3 in doc/requirments.txt (#4421) #4423

Merged
merged 9 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ env/
**/_repack_script_launcher.sh
tests/data/**/_repack_model.py
tests/data/experiment/sagemaker-dev-1.0.tar.gz
src/sagemaker/serve/tmp_workspace
src/sagemaker/serve/tmp_workspace
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Changelog

## v2.208.0 (2024-02-15)

### Features

* Telemetry metrics
* TGI 1.4.0
* Support collection type and target store for feature store ingestion.

### Bug Fixes and Other Changes

* bump jinja2 to 3.1.3 in doc/requirments.txt
* chore(deps): bump jinja2 from 3.0.3 to 3.1.3 in /requirements/extras
* Fix dependabot alert in transformers package
* Bump Apache Airflow version to 2.8.0
* skip failing mxnet tests

### Documentation Changes

* change order of pipelines topics
* Explain the ClarifyCheckStep and QualityCheckStep parameters
* fix the ClarifyCheckStep documentation to mention PDP

## v2.207.1 (2024-02-06)

### Bug Fixes and Other Changes
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.207.2.dev0
2.208.1.dev0
2 changes: 1 addition & 1 deletion doc/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ sphinx==5.1.1
sphinx-rtd-theme==0.5.0
docutils==0.15.2
packaging==20.9
jinja2<3.1
jinja2==3.1.3
schema==0.7.5
2 changes: 1 addition & 1 deletion doc/workflows/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The SageMaker Python SDK supports managed training and inference for a variety o
.. toctree::
:maxdepth: 2

pipelines/index
airflow/index
step_functions/index
pipelines/index
lineage/index
90 changes: 88 additions & 2 deletions src/sagemaker/image_uri_config/autogluon.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"0.5": "0.5.2",
"0.6": "0.6.2",
"0.7": "0.7.0",
"0.8": "0.8.2"
"0.8": "0.8.2",
"1.0": "1.0.0"
},
"versions": {
"0.3.1": {
Expand Down Expand Up @@ -438,6 +439,47 @@
"py_versions": [
"py39"
]
},
"1.0.0": {
"registries": {
"af-south-1": "626614931356",
"il-central-1": "780543022126",
"ap-east-1": "871362719292",
"ap-northeast-1": "763104351884",
"ap-northeast-2": "763104351884",
"ap-northeast-3": "364406365360",
"ap-south-1": "763104351884",
"ap-southeast-1": "763104351884",
"ap-southeast-2": "763104351884",
"ap-southeast-3": "907027046896",
"ap-southeast-4": "457447274322",
"ca-central-1": "763104351884",
"eu-central-1": "763104351884",
"eu-north-1": "763104351884",
"eu-west-1": "763104351884",
"eu-west-2": "763104351884",
"eu-west-3": "763104351884",
"eu-south-1": "692866216735",
"me-south-1": "217643126080",
"sa-east-1": "763104351884",
"us-east-1": "763104351884",
"us-east-2": "763104351884",
"us-gov-east-1": "446045086412",
"us-gov-west-1": "442386744353",
"us-iso-east-1": "886529160074",
"us-isob-east-1": "094389454867",
"us-west-1": "763104351884",
"us-west-2": "763104351884",
"ca-west-1": "204538143572"
},
"repository": "autogluon-training",
"processors": [
"cpu",
"gpu"
],
"py_versions": [
"py310"
]
}
}
},
Expand All @@ -448,7 +490,8 @@
"0.5": "0.5.2",
"0.6": "0.6.2",
"0.7": "0.7.0",
"0.8": "0.8.2"
"0.8": "0.8.2",
"1.0": "1.0.0"
},
"versions": {
"0.3.1": {
Expand Down Expand Up @@ -901,6 +944,49 @@
"py_versions": [
"py39"
]
},
"1.0.0": {
"registries": {
"af-south-1": "626614931356",
"il-central-1": "780543022126",
"ap-east-1": "871362719292",
"ap-northeast-1": "763104351884",
"ap-northeast-2": "763104351884",
"ap-northeast-3": "364406365360",
"ap-south-1": "763104351884",
"ap-southeast-1": "763104351884",
"ap-southeast-2": "763104351884",
"ap-southeast-3": "907027046896",
"ap-southeast-4": "457447274322",
"ca-central-1": "763104351884",
"cn-north-1": "727897471807",
"cn-northwest-1": "727897471807",
"eu-central-1": "763104351884",
"eu-north-1": "763104351884",
"eu-west-1": "763104351884",
"eu-west-2": "763104351884",
"eu-west-3": "763104351884",
"eu-south-1": "692866216735",
"me-south-1": "217643126080",
"sa-east-1": "763104351884",
"us-east-1": "763104351884",
"us-east-2": "763104351884",
"us-gov-east-1": "446045086412",
"us-gov-west-1": "442386744353",
"us-iso-east-1": "886529160074",
"us-isob-east-1": "094389454867",
"us-west-1": "763104351884",
"us-west-2": "763104351884",
"ca-west-1": "204538143572"
},
"repository": "autogluon-inference",
"processors": [
"cpu",
"gpu"
],
"py_versions": [
"py310"
]
}
}
}
Expand Down
50 changes: 49 additions & 1 deletion src/sagemaker/image_uri_config/huggingface-llm.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"1.0": "1.0.3",
"1.1": "1.1.0",
"1.2": "1.2.0",
"1.3": "1.3.3"
"1.3": "1.3.3",
"1.4": "1.4.0"
},
"versions": {
"0.6.0": {
Expand Down Expand Up @@ -388,6 +389,53 @@
"container_version": {
"gpu": "cu121-ubuntu20.04"
}
},
"1.4.0": {
"py_versions": [
"py310"
],
"registries": {
"af-south-1": "626614931356",
"il-central-1": "780543022126",
"ap-east-1": "871362719292",
"ap-northeast-1": "763104351884",
"ap-northeast-2": "763104351884",
"ap-northeast-3": "364406365360",
"ap-south-1": "763104351884",
"ap-south-2": "772153158452",
"ap-southeast-1": "763104351884",
"ap-southeast-2": "763104351884",
"ap-southeast-3": "907027046896",
"ap-southeast-4": "457447274322",
"ca-central-1": "763104351884",
"cn-north-1": "727897471807",
"cn-northwest-1": "727897471807",
"eu-central-1": "763104351884",
"eu-central-2": "380420809688",
"eu-north-1": "763104351884",
"eu-west-1": "763104351884",
"eu-west-2": "763104351884",
"eu-west-3": "763104351884",
"eu-south-1": "692866216735",
"eu-south-2": "503227376785",
"me-south-1": "217643126080",
"me-central-1": "914824155844",
"sa-east-1": "763104351884",
"us-east-1": "763104351884",
"us-east-2": "763104351884",
"us-gov-east-1": "446045086412",
"us-gov-west-1": "442386744353",
"us-iso-east-1": "886529160074",
"us-isob-east-1": "094389454867",
"us-west-1": "763104351884",
"us-west-2": "763104351884",
"ca-west-1": "204538143572"
},
"tag_prefix": "2.1.1-tgi1.4.0",
"repository": "huggingface-pytorch-tgi-inference",
"container_version": {
"gpu": "cu121-ubuntu20.04"
}
}
}
}
Expand Down
23 changes: 21 additions & 2 deletions src/sagemaker/serve/utils/telemetry_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@
"""Placeholder docstring"""
from __future__ import absolute_import
import logging
from time import perf_counter

import requests

from sagemaker import Session
from sagemaker import Session, exceptions
from sagemaker.serve.mode.function_pointers import Mode
from sagemaker.serve.utils.exceptions import ModelBuilderException
from sagemaker.serve.utils.types import ModelServer
from sagemaker.user_agent import SDK_VERSION

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -63,13 +66,21 @@ def wrapper(self, *args, **kwargs):
f"{func_name}"
f"&x-modelServer={MODEL_SERVER_TO_CODE[str(self.model_server)]}"
f"&x-imageTag={image_uri_tail}"
f"&x-sdkVersion={SDK_VERSION}"
)

if self.model_server == ModelServer.DJL_SERVING or self.model_server == ModelServer.TGI:
extra += f"&x-modelName={self.model}"

if self.sagemaker_session and self.sagemaker_session.endpoint_arn:
extra += f"&x-endpointArn={self.sagemaker_session.endpoint_arn}"

start_timer = perf_counter()
try:
response = func(self, *args, **kwargs)
stop_timer = perf_counter()
elapsed = stop_timer - start_timer
extra += f"&x-latency={round(elapsed, 2)}"
if not self.serve_settings.telemetry_opt_out:
_send_telemetry(
"1",
Expand All @@ -79,7 +90,15 @@ def wrapper(self, *args, **kwargs):
None,
extra,
)
except ModelBuilderException as e:
except (
ModelBuilderException,
exceptions.CapacityError,
exceptions.UnexpectedStatusException,
exceptions.AsyncInferenceError,
) as e:
stop_timer = perf_counter()
elapsed = stop_timer - start_timer
extra += f"&x-latency={round(elapsed, 2)}"
if not self.serve_settings.telemetry_opt_out:
_send_telemetry(
"0",
Expand Down
10 changes: 8 additions & 2 deletions src/sagemaker/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ def __init__(
# sagemaker_config is validated and initialized inside :func:`_initialize`,
# so if default_bucket is None and the sagemaker_config has a default S3 bucket configured,
# _default_bucket_name_override will be set again inside :func:`_initialize`.
self.endpoint_arn = None
self._default_bucket = None
self._default_bucket_name_override = default_bucket
# this may also be set again inside :func:`_initialize` if it is None
Expand Down Expand Up @@ -4284,9 +4285,12 @@ def create_endpoint(self, endpoint_name, config_name, tags=None, wait=True, live
tags, "{}.{}.{}".format(SAGEMAKER, ENDPOINT, TAGS)
)

self.sagemaker_client.create_endpoint(
res = self.sagemaker_client.create_endpoint(
EndpointName=endpoint_name, EndpointConfigName=config_name, Tags=tags
)
if res:
self.endpoint_arn = res["EndpointArn"]

if wait:
self.wait_for_endpoint(endpoint_name, live_logging=live_logging)
return endpoint_name
Expand Down Expand Up @@ -4344,9 +4348,11 @@ def update_endpoint(self, endpoint_name, endpoint_config_name, wait=True):
"existing endpoint name".format(endpoint_name)
)

self.sagemaker_client.update_endpoint(
res = self.sagemaker_client.update_endpoint(
EndpointName=endpoint_name, EndpointConfigName=endpoint_config_name
)
if res:
self.endpoint_arn = res["EndpointArn"]

if wait:
self.wait_for_endpoint(endpoint_name)
Expand Down
10 changes: 8 additions & 2 deletions src/sagemaker/workflow/clarify_check_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,10 @@ class ModelExplainabilityCheckConfig(ClarifyCheckConfig):

Attributes:
model_config (ModelConfig): Config of the model and its endpoint to be created.
explainability_config (SHAPConfig): Config of the specific explainability method.
Currently, only SHAP is supported.
explainability_config (SHAPConfig or PDPConfig): Config of the explainability method.
Supports SHAP or PDP.
For `PDPConfig`, `features` must be specified.
`top_k_features` based on SHAP is currently not supported.
model_scores (str or int or ModelPredictedLabelConfig): Index or JMESPath expression
to locate the predicted scores in the model output (default: None).
This is not required if the model output is a single score. Alternatively,
Expand Down Expand Up @@ -166,6 +168,10 @@ def __init__(
):
"""Constructs a ClarifyCheckStep.

To understand the `skip_check`, `fail_on_violation`, `register_new_baseline`
and `supplied_baseline_constraints` parameters, check the following documentation:
https://docs.aws.amazon.com/sagemaker/latest/dg/pipelines-quality-clarify-baseline-lifecycle.html

Args:
name (str): The name of the ClarifyCheckStep step.
clarify_check_config (ClarifyCheckConfig): A ClarifyCheckConfig instance.
Expand Down
5 changes: 5 additions & 0 deletions src/sagemaker/workflow/quality_check_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ def __init__(
):
"""Constructs a QualityCheckStep.

To understand the `skip_check`, `fail_on_violation`, `register_new_baseline`,
`supplied_baseline_constraints` and `supplied_baseline_constraints` parameters,
check the following documentation:
https://docs.aws.amazon.com/sagemaker/latest/dg/pipelines-quality-clarify-baseline-lifecycle.html

Args:
name (str): The name of the QualityCheckStep step.
quality_check_config (QualityCheckConfig): A QualityCheckConfig instance.
Expand Down
1 change: 1 addition & 0 deletions tests/unit/sagemaker/image_uris/test_huggingface_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"1.2.0": "2.1.1-tgi1.2.0-gpu-py310-cu121-ubuntu20.04",
"1.3.1": "2.1.1-tgi1.3.1-gpu-py310-cu121-ubuntu20.04",
"1.3.3": "2.1.1-tgi1.3.3-gpu-py310-cu121-ubuntu20.04",
"1.4.0": "2.1.1-tgi1.4.0-gpu-py310-cu121-ubuntu20.04",
},
"inf2": {
"0.0.16": "1.13.1-optimum0.0.16-neuronx-py310-ubuntu22.04",
Expand Down
Loading