Skip to content

Commit 4bb2a99

Browse files
authored
Merge branch 'master' into fix/remove-unnecessary-get-caller-identity-call
2 parents 82841ea + 052d7e0 commit 4bb2a99

30 files changed

+408
-9
lines changed

src/sagemaker/experiments/run.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
from sagemaker.experiments._helper import (
3030
_ArtifactUploader,
3131
_LineageArtifactTracker,
32+
_DEFAULT_ARTIFACT_PREFIX,
3233
)
3334
from sagemaker.experiments._environment import _RunEnvironment
3435
from sagemaker.experiments._run_context import _RunContext
@@ -95,6 +96,8 @@ def __init__(
9596
run_display_name: Optional[str] = None,
9697
tags: Optional[List[Dict[str, str]]] = None,
9798
sagemaker_session: Optional["Session"] = None,
99+
artifact_bucket: Optional[str] = None,
100+
artifact_prefix: Optional[str] = None,
98101
):
99102
"""Construct a `Run` instance.
100103
@@ -152,6 +155,11 @@ def __init__(
152155
manages interactions with Amazon SageMaker APIs and any other
153156
AWS services needed. If not specified, one is created using the
154157
default AWS configuration chain.
158+
artifact_bucket (str): The S3 bucket to upload the artifact to.
159+
If not specified, the default bucket defined in `sagemaker_session`
160+
will be used.
161+
artifact_prefix (str): The S3 key prefix used to generate the S3 path
162+
to upload the artifact to (default: "trial-component-artifacts").
155163
"""
156164
# TODO: we should revert the lower casting once backend fix reaches prod
157165
self.experiment_name = experiment_name.lower()
@@ -197,6 +205,10 @@ def __init__(
197205
self._artifact_uploader = _ArtifactUploader(
198206
trial_component_name=self._trial_component.trial_component_name,
199207
sagemaker_session=sagemaker_session,
208+
artifact_bucket=artifact_bucket,
209+
artifact_prefix=_DEFAULT_ARTIFACT_PREFIX
210+
if artifact_prefix is None
211+
else artifact_prefix,
200212
)
201213
self._lineage_artifact_tracker = _LineageArtifactTracker(
202214
trial_component_arn=self._trial_component.trial_component_arn,
@@ -729,6 +741,8 @@ def load_run(
729741
run_name: Optional[str] = None,
730742
experiment_name: Optional[str] = None,
731743
sagemaker_session: Optional["Session"] = None,
744+
artifact_bucket: Optional[str] = None,
745+
artifact_prefix: Optional[str] = None,
732746
) -> Run:
733747
"""Load an existing run.
734748
@@ -792,6 +806,11 @@ def load_run(
792806
manages interactions with Amazon SageMaker APIs and any other
793807
AWS services needed. If not specified, one is created using the
794808
default AWS configuration chain.
809+
artifact_bucket (str): The S3 bucket to upload the artifact to.
810+
If not specified, the default bucket defined in `sagemaker_session`
811+
will be used.
812+
artifact_prefix (str): The S3 key prefix used to generate the S3 path
813+
to upload the artifact to (default: "trial-component-artifacts").
795814
796815
Returns:
797816
Run: The loaded Run object.
@@ -811,6 +830,8 @@ def load_run(
811830
experiment_name=experiment_name,
812831
run_name=run_name,
813832
sagemaker_session=sagemaker_session or _utils.default_session(),
833+
artifact_bucket=artifact_bucket,
834+
artifact_prefix=artifact_prefix,
814835
)
815836
elif _RunContext.get_current_run():
816837
run_instance = _RunContext.get_current_run()
@@ -827,6 +848,8 @@ def load_run(
827848
experiment_name=experiment_name,
828849
run_name=run_name,
829850
sagemaker_session=sagemaker_session or _utils.default_session(),
851+
artifact_bucket=artifact_bucket,
852+
artifact_prefix=artifact_prefix,
830853
)
831854
else:
832855
raise RuntimeError(

src/sagemaker/image_uri_config/autogluon.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"0.3.1": {
1313
"registries": {
1414
"af-south-1": "626614931356",
15+
"il-central-1": "780543022126",
1516
"ap-east-1": "871362719292",
1617
"ap-northeast-1": "763104351884",
1718
"ap-northeast-2": "763104351884",
@@ -49,6 +50,7 @@
4950
"0.3.2": {
5051
"registries": {
5152
"af-south-1": "626614931356",
53+
"il-central-1": "780543022126",
5254
"ap-east-1": "871362719292",
5355
"ap-northeast-1": "763104351884",
5456
"ap-northeast-2": "763104351884",
@@ -86,6 +88,7 @@
8688
"0.4.0": {
8789
"registries": {
8890
"af-south-1": "626614931356",
91+
"il-central-1": "780543022126",
8992
"ap-east-1": "871362719292",
9093
"ap-northeast-1": "763104351884",
9194
"ap-northeast-2": "763104351884",
@@ -124,6 +127,7 @@
124127
"0.4.2": {
125128
"registries": {
126129
"af-south-1": "626614931356",
130+
"il-central-1": "780543022126",
127131
"ap-east-1": "871362719292",
128132
"ap-northeast-1": "763104351884",
129133
"ap-northeast-2": "763104351884",
@@ -162,6 +166,7 @@
162166
"0.4.3": {
163167
"registries": {
164168
"af-south-1": "626614931356",
169+
"il-central-1": "780543022126",
165170
"ap-east-1": "871362719292",
166171
"ap-northeast-1": "763104351884",
167172
"ap-northeast-2": "763104351884",
@@ -200,6 +205,7 @@
200205
"0.5.2": {
201206
"registries": {
202207
"af-south-1": "626614931356",
208+
"il-central-1": "780543022126",
203209
"ap-east-1": "871362719292",
204210
"ap-northeast-1": "763104351884",
205211
"ap-northeast-2": "763104351884",
@@ -238,6 +244,7 @@
238244
"0.6.1": {
239245
"registries": {
240246
"af-south-1": "626614931356",
247+
"il-central-1": "780543022126",
241248
"ap-east-1": "871362719292",
242249
"ap-northeast-1": "763104351884",
243250
"ap-northeast-2": "763104351884",
@@ -272,6 +279,7 @@
272279
"0.6.2": {
273280
"registries": {
274281
"af-south-1": "626614931356",
282+
"il-central-1": "780543022126",
275283
"ap-east-1": "871362719292",
276284
"ap-northeast-1": "763104351884",
277285
"ap-northeast-2": "763104351884",
@@ -306,6 +314,7 @@
306314
"0.7.0": {
307315
"registries": {
308316
"af-south-1": "626614931356",
317+
"il-central-1": "780543022126",
309318
"ap-east-1": "871362719292",
310319
"ap-northeast-1": "763104351884",
311320
"ap-northeast-2": "763104351884",
@@ -351,6 +360,7 @@
351360
"0.3.1": {
352361
"registries": {
353362
"af-south-1": "626614931356",
363+
"il-central-1": "780543022126",
354364
"ap-east-1": "871362719292",
355365
"ap-northeast-1": "763104351884",
356366
"ap-northeast-2": "763104351884",
@@ -391,6 +401,7 @@
391401
"0.3.2": {
392402
"registries": {
393403
"af-south-1": "626614931356",
404+
"il-central-1": "780543022126",
394405
"ap-east-1": "871362719292",
395406
"ap-northeast-1": "763104351884",
396407
"ap-northeast-2": "763104351884",
@@ -431,6 +442,7 @@
431442
"0.4.0": {
432443
"registries": {
433444
"af-south-1": "626614931356",
445+
"il-central-1": "780543022126",
434446
"ap-east-1": "871362719292",
435447
"ap-northeast-1": "763104351884",
436448
"ap-northeast-2": "763104351884",
@@ -471,6 +483,7 @@
471483
"0.4.2": {
472484
"registries": {
473485
"af-south-1": "626614931356",
486+
"il-central-1": "780543022126",
474487
"ap-east-1": "871362719292",
475488
"ap-northeast-1": "763104351884",
476489
"ap-northeast-2": "763104351884",
@@ -511,6 +524,7 @@
511524
"0.4.3": {
512525
"registries": {
513526
"af-south-1": "626614931356",
527+
"il-central-1": "780543022126",
514528
"ap-east-1": "871362719292",
515529
"ap-northeast-1": "763104351884",
516530
"ap-northeast-2": "763104351884",
@@ -551,6 +565,7 @@
551565
"0.5.2": {
552566
"registries": {
553567
"af-south-1": "626614931356",
568+
"il-central-1": "780543022126",
554569
"ap-east-1": "871362719292",
555570
"ap-northeast-1": "763104351884",
556571
"ap-northeast-2": "763104351884",
@@ -591,6 +606,7 @@
591606
"0.6.1": {
592607
"registries": {
593608
"af-south-1": "626614931356",
609+
"il-central-1": "780543022126",
594610
"ap-east-1": "871362719292",
595611
"ap-northeast-1": "763104351884",
596612
"ap-northeast-2": "763104351884",
@@ -627,6 +643,7 @@
627643
"0.6.2": {
628644
"registries": {
629645
"af-south-1": "626614931356",
646+
"il-central-1": "780543022126",
630647
"ap-east-1": "871362719292",
631648
"ap-northeast-1": "763104351884",
632649
"ap-northeast-2": "763104351884",
@@ -663,6 +680,7 @@
663680
"0.7.0": {
664681
"registries": {
665682
"af-south-1": "626614931356",
683+
"il-central-1": "780543022126",
666684
"ap-east-1": "871362719292",
667685
"ap-northeast-1": "763104351884",
668686
"ap-northeast-2": "763104351884",

src/sagemaker/image_uri_config/djl-deepspeed.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"0.22.1": {
55
"registries": {
66
"af-south-1": "626614931356",
7+
"il-central-1": "780543022126",
78
"ap-east-1": "871362719292",
89
"ap-northeast-1": "763104351884",
910
"ap-northeast-2": "763104351884",
@@ -34,6 +35,7 @@
3435
"0.21.0": {
3536
"registries": {
3637
"af-south-1": "626614931356",
38+
"il-central-1": "780543022126",
3739
"ap-east-1": "871362719292",
3840
"ap-northeast-1": "763104351884",
3941
"ap-northeast-2": "763104351884",
@@ -64,6 +66,7 @@
6466
"0.20.0": {
6567
"registries": {
6668
"af-south-1": "626614931356",
69+
"il-central-1": "780543022126",
6770
"ap-east-1": "871362719292",
6871
"ap-northeast-1": "763104351884",
6972
"ap-northeast-2": "763104351884",
@@ -94,6 +97,7 @@
9497
"0.19.0": {
9598
"registries": {
9699
"af-south-1": "626614931356",
100+
"il-central-1": "780543022126",
97101
"ap-east-1": "871362719292",
98102
"ap-northeast-1": "763104351884",
99103
"ap-northeast-2": "763104351884",

src/sagemaker/image_uri_config/djl-fastertransformer.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"0.22.1": {
55
"registries": {
66
"af-south-1": "626614931356",
7+
"il-central-1": "780543022126",
78
"ap-east-1": "871362719292",
89
"ap-northeast-1": "763104351884",
910
"ap-northeast-2": "763104351884",
@@ -34,6 +35,7 @@
3435
"0.21.0": {
3536
"registries": {
3637
"af-south-1": "626614931356",
38+
"il-central-1": "780543022126",
3739
"ap-east-1": "871362719292",
3840
"ap-northeast-1": "763104351884",
3941
"ap-northeast-2": "763104351884",

src/sagemaker/image_uri_config/djl-neuronx.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"0.22.1": {
55
"registries": {
66
"af-south-1": "626614931356",
7+
"il-central-1": "780543022126",
78
"ap-east-1": "871362719292",
89
"ap-northeast-1": "763104351884",
910
"ap-northeast-2": "763104351884",

src/sagemaker/image_uri_config/huggingface-llm.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"py_versions": ["py39"],
1111
"registries": {
1212
"af-south-1": "626614931356",
13+
"il-central-1": "780543022126",
1314
"ap-east-1": "871362719292",
1415
"ap-northeast-1": "763104351884",
1516
"ap-northeast-2": "763104351884",
@@ -51,6 +52,7 @@
5152
"py_versions": ["py39"],
5253
"registries": {
5354
"af-south-1": "626614931356",
55+
"il-central-1": "780543022126",
5456
"ap-east-1": "871362719292",
5557
"ap-northeast-1": "763104351884",
5658
"ap-northeast-2": "763104351884",

src/sagemaker/image_uri_config/huggingface-neuron.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"repository": "huggingface-pytorch-inference-neuron",
1111
"registries": {
1212
"af-south-1": "626614931356",
13+
"il-central-1": "780543022126",
1314
"ap-east-1": "871362719292",
1415
"ap-northeast-1": "763104351884",
1516
"ap-northeast-2": "763104351884",

src/sagemaker/image_uri_config/huggingface-neuronx.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"repository": "huggingface-pytorch-training-neuronx",
1111
"registries": {
1212
"af-south-1": "626614931356",
13+
"il-central-1": "780543022126",
1314
"ap-east-1": "871362719292",
1415
"ap-northeast-1": "763104351884",
1516
"ap-northeast-2": "763104351884",
@@ -58,6 +59,7 @@
5859
"repository": "huggingface-pytorch-inference-neuronx",
5960
"registries": {
6061
"af-south-1": "626614931356",
62+
"il-central-1": "780543022126",
6163
"ap-east-1": "871362719292",
6264
"ap-northeast-1": "763104351884",
6365
"ap-northeast-2": "763104351884",

src/sagemaker/image_uri_config/huggingface-training-compiler.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
"py_versions": ["py38"],
4545
"registries": {
4646
"af-south-1": "626614931356",
47+
"il-central-1": "780543022126",
4748
"ap-east-1": "871362719292",
4849
"ap-northeast-1": "763104351884",
4950
"ap-northeast-2": "763104351884",
@@ -78,6 +79,7 @@
7879
"py_versions": ["py38"],
7980
"registries": {
8081
"af-south-1": "626614931356",
82+
"il-central-1": "780543022126",
8183
"ap-east-1": "871362719292",
8284
"ap-northeast-1": "763104351884",
8385
"ap-northeast-2": "763104351884",
@@ -117,6 +119,7 @@
117119
"py_versions": ["py38"],
118120
"registries": {
119121
"af-south-1": "626614931356",
122+
"il-central-1": "780543022126",
120123
"ap-east-1": "871362719292",
121124
"ap-northeast-1": "763104351884",
122125
"ap-northeast-2": "763104351884",

0 commit comments

Comments
 (0)