Skip to content

Commit ef9659f

Browse files
Merge branch 'master' into master
2 parents 8aae27f + 09fe1c6 commit ef9659f

File tree

4 files changed

+64
-9
lines changed

4 files changed

+64
-9
lines changed

CHANGELOG.md

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

3+
## v2.213.0 (2024-03-15)
4+
5+
### Features
6+
7+
* Add support for Streaming Inference
8+
* tgi optimum 0.0.19, 0.0.20 releases
9+
* support JumpStart proprietary models
10+
* Add ModelDataSource and SourceUri support for model package and while registering
11+
* Accept user-defined env variables for the entry-point
12+
* Add overriding logic in ModelBuilder when task is provided
13+
14+
### Bug Fixes and Other Changes
15+
16+
* Improvement of the tuner documentation
17+
* Skip of tests which are long running and causing the ResourceLimitInUse exception
18+
* Add AutoML -> AutoMLV2 mapper
19+
* add ci-health checks
20+
* split coverage out from testenv in tox.ini
21+
* add PT 2.2 support for smdistributed, pytorchddp, and torch_distributed distributions
22+
* sagemaker session region not being used
23+
* chore: emit warning when no instance specific gated training env var is available, and raise exception when accept_eula flag is not supplied
24+
* enable github actions for PRs
25+
* Move sagemaker pysdk version check after bootstrap in remote job
26+
* make unit tests compatible with pytest-xdist
27+
* Update tblib constraint
28+
329
## v2.212.0 (2024-03-06)
430

531
### Features

VERSION

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

src/sagemaker/tuner.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# ANY KIND, either express or implied. See the License for the specific
1212
# language governing permissions and limitations under the License.
1313
"""Placeholder docstring"""
14+
1415
from __future__ import absolute_import
1516

1617
import importlib
@@ -641,8 +642,11 @@ def __init__(
641642
extract the metric from the logs. This should be defined only
642643
for hyperparameter tuning jobs that don't use an Amazon
643644
algorithm.
644-
strategy (str or PipelineVariable): Strategy to be used for hyperparameter estimations
645-
(default: 'Bayesian').
645+
strategy (str or PipelineVariable): Strategy to be used for hyperparameter estimations.
646+
More information about different strategies:
647+
https://docs.aws.amazon.com/sagemaker/latest/dg/automatic-model-tuning-how-it-works.html.
648+
Available options are: 'Bayesian', 'Random', 'Hyperband',
649+
'Grid' (default: 'Bayesian')
646650
objective_type (str or PipelineVariable): The type of the objective metric for
647651
evaluating training jobs. This value can be either 'Minimize' or
648652
'Maximize' (default: 'Maximize').
@@ -759,7 +763,8 @@ def __init__(
759763
self.autotune = autotune
760764

761765
def override_resource_config(
762-
self, instance_configs: Union[List[InstanceConfig], Dict[str, List[InstanceConfig]]]
766+
self,
767+
instance_configs: Union[List[InstanceConfig], Dict[str, List[InstanceConfig]]],
763768
):
764769
"""Override the instance configuration of the estimators used by the tuner.
765770
@@ -966,7 +971,7 @@ def fit(
966971
include_cls_metadata: Union[bool, Dict[str, bool]] = False,
967972
estimator_kwargs: Optional[Dict[str, dict]] = None,
968973
wait: bool = True,
969-
**kwargs
974+
**kwargs,
970975
):
971976
"""Start a hyperparameter tuning job.
972977
@@ -1055,7 +1060,7 @@ def _fit_with_estimator_dict(self, inputs, job_name, include_cls_metadata, estim
10551060
allowed_keys=estimator_names,
10561061
)
10571062

1058-
for (estimator_name, estimator) in self.estimator_dict.items():
1063+
for estimator_name, estimator in self.estimator_dict.items():
10591064
ins = inputs.get(estimator_name, None) if inputs is not None else None
10601065
args = estimator_kwargs.get(estimator_name, {}) if estimator_kwargs is not None else {}
10611066
self._prepare_estimator_for_tuning(estimator, ins, job_name, **args)
@@ -1282,7 +1287,7 @@ def _attach_with_training_details_list(cls, sagemaker_session, estimator_cls, jo
12821287
objective_metric_name_dict=objective_metric_name_dict,
12831288
hyperparameter_ranges_dict=hyperparameter_ranges_dict,
12841289
metric_definitions_dict=metric_definitions_dict,
1285-
**init_params
1290+
**init_params,
12861291
)
12871292

12881293
def deploy(
@@ -1297,7 +1302,7 @@ def deploy(
12971302
model_name=None,
12981303
kms_key=None,
12991304
data_capture_config=None,
1300-
**kwargs
1305+
**kwargs,
13011306
):
13021307
"""Deploy the best trained or user specified model to an Amazon SageMaker endpoint.
13031308
@@ -1363,7 +1368,7 @@ def deploy(
13631368
model_name=model_name,
13641369
kms_key=kms_key,
13651370
data_capture_config=data_capture_config,
1366-
**kwargs
1371+
**kwargs,
13671372
)
13681373

13691374
def stop_tuning_job(self):

tests/integ/test_auto_ml_v2.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ def test_time_series_forecasting_session_job_name():
5050
return unique_name_from_base("ts-forecast-job", max_length=32)
5151

5252

53+
@pytest.mark.skip(
54+
reason="The test is disabled because it's causing the ResourceLimit exception. \
55+
Please run that manually before the proper fix."
56+
)
5357
@pytest.mark.skipif(
5458
tests.integ.test_region() in tests.integ.NO_AUTO_ML_REGIONS,
5559
reason="AutoML is not supported in the region yet.",
@@ -116,6 +120,10 @@ def test_auto_ml_v2_describe_auto_ml_job(
116120
assert desc["OutputDataConfig"] == expected_default_output_config
117121

118122

123+
@pytest.mark.skip(
124+
reason="The test is disabled because it's causing the ResourceLimit exception. \
125+
Please run that manually before the proper fix."
126+
)
119127
@pytest.mark.skipif(
120128
tests.integ.test_region() in tests.integ.NO_AUTO_ML_REGIONS,
121129
reason="AutoML is not supported in the region yet.",
@@ -181,6 +189,10 @@ def test_auto_ml_v2_attach(problem_type, job_name_fixture_key, sagemaker_session
181189
assert desc["OutputDataConfig"] == expected_default_output_config
182190

183191

192+
@pytest.mark.skip(
193+
reason="The test is disabled because it's causing the ResourceLimit exception. \
194+
Please run that manually before the proper fix."
195+
)
184196
@pytest.mark.skipif(
185197
tests.integ.test_region() in tests.integ.NO_AUTO_ML_REGIONS,
186198
reason="AutoML is not supported in the region yet.",
@@ -258,6 +270,10 @@ def test_list_candidates(
258270
pytest.skip("The job hasn't finished yet")
259271

260272

273+
@pytest.mark.skip(
274+
reason="The test is disabled because it's causing the ResourceLimit exception. \
275+
Please run that manually before the proper fix."
276+
)
261277
@pytest.mark.skipif(
262278
tests.integ.test_region() in tests.integ.NO_AUTO_ML_REGIONS,
263279
reason="AutoML is not supported in the region yet.",
@@ -329,6 +345,10 @@ def test_best_candidate(
329345
pytest.skip("The job hasn't finished yet")
330346

331347

348+
@pytest.mark.skip(
349+
reason="The test is disabled because it's causing the ResourceLimit exception. \
350+
Please run that manually before the proper fix."
351+
)
332352
@pytest.mark.skipif(
333353
tests.integ.test_region() in tests.integ.NO_AUTO_ML_REGIONS
334354
or tests.integ.test_region() in tests.integ.NO_CANVAS_REGIONS,
@@ -423,6 +443,10 @@ def test_deploy_best_candidate(
423443
pytest.skip("The job hasn't finished yet")
424444

425445

446+
@pytest.mark.skip(
447+
reason="The test is disabled because it's causing the ResourceLimit exception. \
448+
Please run that manually before the proper fix."
449+
)
426450
@pytest.mark.skipif(
427451
tests.integ.test_region() in tests.integ.NO_AUTO_ML_REGIONS,
428452
reason="AutoML is not supported in the region yet.",

0 commit comments

Comments
 (0)