Skip to content

Commit c12d5c1

Browse files
committed
Merge remote-tracking branch 'upstream/master' into modernize-metadata
2 parents 223387e + fb609f5 commit c12d5c1

File tree

106 files changed

+8683
-828
lines changed

Some content is hidden

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

106 files changed

+8683
-828
lines changed

CHANGELOG.md

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

3+
## v2.226.0 (2024-07-12)
4+
5+
### Features
6+
7+
* Curated hub improvements
8+
* InferenceSpec support for MMS and testing
9+
10+
### Bug Fixes and Other Changes
11+
12+
* ModelBuilder not passing HF_TOKEN to model.
13+
* update image_uri_configs 07-10-2024 07:18:04 PST
14+
15+
## v2.225.0 (2024-07-10)
16+
17+
### Features
18+
19+
* model optimization
20+
21+
### Bug Fixes and Other Changes
22+
23+
* fix integ test
24+
* update uris for v1.1.1
25+
* update image_uri_configs 07-04-2024 07:17:24 PST
26+
27+
## v2.224.4 (2024-07-04)
28+
29+
### Bug Fixes and Other Changes
30+
31+
* allow for inf spec and server override to be passed
32+
33+
## v2.224.3 (2024-07-03)
34+
35+
### Bug Fixes and Other Changes
36+
37+
* Upgrade local dependencies
38+
* Improve docstrings for estimator tags
39+
40+
## v2.224.2 (2024-06-27)
41+
42+
### Bug Fixes and Other Changes
43+
44+
* Update DJLModel class for latest container releases
45+
* list_models() for python3.8
46+
347
## v2.224.1 (2024-06-21)
448

549
### Bug Fixes and Other Changes

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.224.2.dev0
1+
2.226.1.dev0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
urllib3>=1.26.8,<3.0.0
2-
docker>=5.0.2,<7.0.0
2+
docker>=5.0.2,<8.0.0
33
PyYAML>=5.4.1,<7

requirements/extras/test_requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,4 @@ accelerate>=0.24.1,<=0.27.0
3939
schema==0.7.5
4040
tensorflow>=2.1,<=2.16
4141
mlflow>=2.12.2,<2.13
42+
huggingface_hub>=0.23.4

src/sagemaker/accept_types.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ def retrieve_default(
8282
tolerate_deprecated_model: bool = False,
8383
sagemaker_session: Session = DEFAULT_JUMPSTART_SAGEMAKER_SESSION,
8484
model_type: JumpStartModelType = JumpStartModelType.OPEN_WEIGHTS,
85+
config_name: Optional[str] = None,
8586
) -> str:
8687
"""Retrieves the default accept type for the model matching the given arguments.
8788
@@ -105,6 +106,7 @@ def retrieve_default(
105106
object, used for SageMaker interactions. If not
106107
specified, one is created using the default AWS configuration
107108
chain. (Default: sagemaker.jumpstart.constants.DEFAULT_JUMPSTART_SAGEMAKER_SESSION).
109+
config_name (Optional[str]): Name of the JumpStart Model config to apply. (Default: None).
108110
Returns:
109111
str: The default accept type to use for the model.
110112
@@ -125,4 +127,5 @@ def retrieve_default(
125127
tolerate_deprecated_model=tolerate_deprecated_model,
126128
sagemaker_session=sagemaker_session,
127129
model_type=model_type,
130+
config_name=config_name,
128131
)

src/sagemaker/content_types.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ def retrieve_default(
8282
tolerate_deprecated_model: bool = False,
8383
sagemaker_session: Session = DEFAULT_JUMPSTART_SAGEMAKER_SESSION,
8484
model_type: JumpStartModelType = JumpStartModelType.OPEN_WEIGHTS,
85+
config_name: Optional[str] = None,
8586
) -> str:
8687
"""Retrieves the default content type for the model matching the given arguments.
8788
@@ -105,6 +106,7 @@ def retrieve_default(
105106
object, used for SageMaker interactions. If not
106107
specified, one is created using the default AWS configuration
107108
chain. (Default: sagemaker.jumpstart.constants.DEFAULT_JUMPSTART_SAGEMAKER_SESSION).
109+
config_name (Optional[str]): Name of the JumpStart Model config to apply. (Default: None).
108110
Returns:
109111
str: The default content type to use for the model.
110112
@@ -125,6 +127,7 @@ def retrieve_default(
125127
tolerate_deprecated_model=tolerate_deprecated_model,
126128
sagemaker_session=sagemaker_session,
127129
model_type=model_type,
130+
config_name=config_name,
128131
)
129132

130133

src/sagemaker/deserializers.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ def retrieve_default(
102102
tolerate_deprecated_model: bool = False,
103103
sagemaker_session: Session = DEFAULT_JUMPSTART_SAGEMAKER_SESSION,
104104
model_type: JumpStartModelType = JumpStartModelType.OPEN_WEIGHTS,
105+
config_name: Optional[str] = None,
105106
) -> BaseDeserializer:
106107
"""Retrieves the default deserializer for the model matching the given arguments.
107108
@@ -125,6 +126,7 @@ def retrieve_default(
125126
object, used for SageMaker interactions. If not
126127
specified, one is created using the default AWS configuration
127128
chain. (Default: sagemaker.jumpstart.constants.DEFAULT_JUMPSTART_SAGEMAKER_SESSION).
129+
config_name (Optional[str]): Name of the JumpStart Model config to apply. (Default: None).
128130
Returns:
129131
BaseDeserializer: The default deserializer to use for the model.
130132
@@ -146,4 +148,5 @@ def retrieve_default(
146148
tolerate_deprecated_model=tolerate_deprecated_model,
147149
sagemaker_session=sagemaker_session,
148150
model_type=model_type,
151+
config_name=config_name,
149152
)

src/sagemaker/enums.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,12 @@ class RoutingStrategy(Enum):
4040
"""The endpoint routes requests to the specific instances that have
4141
more capacity to process them.
4242
"""
43+
44+
45+
class Tag(str, Enum):
46+
"""Enum class for tag keys to apply to models."""
47+
48+
OPTIMIZATION_JOB_NAME = "sagemaker-sdk:optimization-job-name"
49+
SPECULATIVE_DRAFT_MODEL_PROVIDER = "sagemaker-sdk:speculative-draft-model-provider"
50+
FINE_TUNING_MODEL_PATH = "sagemaker-sdk:fine-tuning-model-path"
51+
FINE_TUNING_JOB_NAME = "sagemaker-sdk:fine-tuning-job-name"

src/sagemaker/environment_variables.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def retrieve_default(
3737
sagemaker_session: Session = DEFAULT_JUMPSTART_SAGEMAKER_SESSION,
3838
instance_type: Optional[str] = None,
3939
script: JumpStartScriptScope = JumpStartScriptScope.INFERENCE,
40+
config_name: Optional[str] = None,
4041
) -> Dict[str, str]:
4142
"""Retrieves the default container environment variables for the model matching the arguments.
4243
@@ -68,6 +69,7 @@ def retrieve_default(
6869
variables specific for the instance type.
6970
script (JumpStartScriptScope): The JumpStart script for which to retrieve environment
7071
variables.
72+
config_name (Optional[str]): Name of the JumpStart Model config to apply. (Default: None).
7173
Returns:
7274
dict: The variables to use for the model.
7375
@@ -91,4 +93,5 @@ def retrieve_default(
9193
sagemaker_session=sagemaker_session,
9294
instance_type=instance_type,
9395
script=script,
96+
config_name=config_name,
9497
)

src/sagemaker/estimator.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,10 @@ def __init__(
274274
AWS services needed. If not specified, the estimator creates one
275275
using the default AWS configuration chain.
276276
tags (Optional[Tags]):
277-
Tags for labeling a training job. For more, see
277+
Tags for labeling a training job. These won't be propagated to Models,
278+
Endpoints during :meth:`~sagemaker.estimator.EstimatorBase.deploy`. The
279+
:meth:`~sagemaker.estimator.EstimatorBase.deploy` takes in a seperate
280+
tags parameter. For more on tags, see
278281
https://docs.aws.amazon.com/sagemaker/latest/dg/API_Tag.html.
279282
subnets (list[str] or list[PipelineVariable]): List of subnet ids. If not
280283
specified training job will be created without VPC config.

0 commit comments

Comments
 (0)