Skip to content

Commit 709bedc

Browse files
committed
bad rebase
1 parent da1b642 commit 709bedc

File tree

13 files changed

+1
-38
lines changed

13 files changed

+1
-38
lines changed

src/sagemaker/jumpstart/accessors.py

-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@ def get_model_specs(
257257
hub_arn: Optional[str] = None,
258258
s3_client: Optional[boto3.client] = None,
259259
model_type=JumpStartModelType.OPEN_WEIGHTS,
260-
hub_arn: Optional[str] = None,
261260
) -> JumpStartModelSpecs:
262261
"""Returns model specs from JumpStart models cache.
263262

src/sagemaker/jumpstart/cache.py

-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
DescribeHubContentsResponse,
5959
HubType,
6060
HubContentType,
61-
HubDataType,
6261
)
6362
from sagemaker.jumpstart.curated_hub import utils as hub_utils
6463
from sagemaker.jumpstart.enums import JumpStartModelType

src/sagemaker/jumpstart/estimator.py

-1
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,6 @@ def _validate_model_id_and_get_type_hook():
534534
model_version=model_version,
535535
hub_arn=hub_arn,
536536
model_type=self.model_type,
537-
hub_arn=hub_arn,
538537
tolerate_vulnerable_model=tolerate_vulnerable_model,
539538
tolerate_deprecated_model=tolerate_deprecated_model,
540539
role=role,

src/sagemaker/jumpstart/factory/estimator.py

-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ def get_init_kwargs(
8181
model_version: Optional[str] = None,
8282
hub_arn: Optional[str] = None,
8383
model_type: Optional[JumpStartModelType] = JumpStartModelType.OPEN_WEIGHTS,
84-
hub_arn: Optional[str] = None,
8584
tolerate_vulnerable_model: Optional[bool] = None,
8685
tolerate_deprecated_model: Optional[bool] = None,
8786
region: Optional[str] = None,
@@ -141,7 +140,6 @@ def get_init_kwargs(
141140
model_version=model_version,
142141
hub_arn=hub_arn,
143142
model_type=model_type,
144-
hub_arn=hub_arn,
145143
role=role,
146144
region=region,
147145
instance_count=instance_count,

src/sagemaker/jumpstart/factory/model.py

-4
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,6 @@ def get_deploy_kwargs(
550550
model_version: Optional[str] = None,
551551
hub_arn: Optional[str] = None,
552552
model_type: JumpStartModelType = JumpStartModelType.OPEN_WEIGHTS,
553-
hub_arn: Optional[str] = None,
554553
region: Optional[str] = None,
555554
initial_instance_count: Optional[int] = None,
556555
instance_type: Optional[str] = None,
@@ -585,7 +584,6 @@ def get_deploy_kwargs(
585584
model_version=model_version,
586585
hub_arn=hub_arn,
587586
model_type=model_type,
588-
hub_arn=hub_arn,
589587
region=region,
590588
initial_instance_count=initial_instance_count,
591589
instance_type=instance_type,
@@ -726,7 +724,6 @@ def get_init_kwargs(
726724
model_version: Optional[str] = None,
727725
hub_arn: Optional[str] = None,
728726
model_type: Optional[JumpStartModelType] = JumpStartModelType.OPEN_WEIGHTS,
729-
hub_arn: Optional[str] = None,
730727
tolerate_vulnerable_model: Optional[bool] = None,
731728
tolerate_deprecated_model: Optional[bool] = None,
732729
instance_type: Optional[str] = None,
@@ -760,7 +757,6 @@ def get_init_kwargs(
760757
model_version=model_version,
761758
hub_arn=hub_arn,
762759
model_type=model_type,
763-
hub_arn=hub_arn,
764760
instance_type=instance_type,
765761
region=region,
766762
image_uri=image_uri,

src/sagemaker/jumpstart/types.py

+1-12
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from copy import deepcopy
1616
from enum import Enum
1717
from typing import Any, Dict, List, Optional, Set, Union
18+
from sagemaker.session import Session
1819
from sagemaker.utils import get_instance_type_family, format_tags, Tags
1920
from sagemaker.enums import EndpointType
2021
from sagemaker.model_metrics import ModelMetrics
@@ -1290,7 +1291,6 @@ class JumpStartModelInitKwargs(JumpStartKwargs):
12901291
"model_version",
12911292
"hub_arn",
12921293
"model_type",
1293-
"hub_arn",
12941294
"instance_type",
12951295
"tolerate_vulnerable_model",
12961296
"tolerate_deprecated_model",
@@ -1323,7 +1323,6 @@ class JumpStartModelInitKwargs(JumpStartKwargs):
13231323
"model_version",
13241324
"hub_arn",
13251325
"model_type",
1326-
"hub_arn",
13271326
"tolerate_vulnerable_model",
13281327
"tolerate_deprecated_model",
13291328
"region",
@@ -1337,7 +1336,6 @@ def __init__(
13371336
model_version: Optional[str] = None,
13381337
hub_arn: Optional[str] = None,
13391338
model_type: Optional[JumpStartModelType] = JumpStartModelType.OPEN_WEIGHTS,
1340-
hub_arn: Optional[str] = None,
13411339
region: Optional[str] = None,
13421340
instance_type: Optional[str] = None,
13431341
image_uri: Optional[Union[str, Any]] = None,
@@ -1369,7 +1367,6 @@ def __init__(
13691367
self.model_version = model_version
13701368
self.hub_arn = hub_arn
13711369
self.model_type = model_type
1372-
self.hub_arn = hub_arn
13731370
self.instance_type = instance_type
13741371
self.region = region
13751372
self.image_uri = image_uri
@@ -1404,7 +1401,6 @@ class JumpStartModelDeployKwargs(JumpStartKwargs):
14041401
"model_version",
14051402
"hub_arn",
14061403
"model_type",
1407-
"hub_arn",
14081404
"initial_instance_count",
14091405
"instance_type",
14101406
"region",
@@ -1436,7 +1432,6 @@ class JumpStartModelDeployKwargs(JumpStartKwargs):
14361432
SERIALIZATION_EXCLUSION_SET = {
14371433
"model_id",
14381434
"model_version",
1439-
"hub_arn",
14401435
"model_type",
14411436
"hub_arn",
14421437
"region",
@@ -1485,7 +1480,6 @@ def __init__(
14851480
self.model_version = model_version
14861481
self.hub_arn = hub_arn
14871482
self.model_type = model_type
1488-
self.hub_arn = hub_arn
14891483
self.initial_instance_count = initial_instance_count
14901484
self.instance_type = instance_type
14911485
self.region = region
@@ -1522,7 +1516,6 @@ class JumpStartEstimatorInitKwargs(JumpStartKwargs):
15221516
"model_version",
15231517
"hub_arn",
15241518
"model_type",
1525-
"hub_arn",
15261519
"instance_type",
15271520
"instance_count",
15281521
"region",
@@ -1584,7 +1577,6 @@ class JumpStartEstimatorInitKwargs(JumpStartKwargs):
15841577
"model_version",
15851578
"hub_arn",
15861579
"model_type",
1587-
"hub_arn",
15881580
}
15891581

15901582
def __init__(
@@ -1714,7 +1706,6 @@ class JumpStartEstimatorFitKwargs(JumpStartKwargs):
17141706
"model_version",
17151707
"hub_arn",
17161708
"model_type",
1717-
"hub_arn",
17181709
"region",
17191710
"inputs",
17201711
"wait",
@@ -1731,7 +1722,6 @@ class JumpStartEstimatorFitKwargs(JumpStartKwargs):
17311722
"model_version",
17321723
"hub_arn",
17331724
"model_type",
1734-
"hub_arn",
17351725
"region",
17361726
"tolerate_deprecated_model",
17371727
"tolerate_vulnerable_model",
@@ -1760,7 +1750,6 @@ def __init__(
17601750
self.model_version = model_version
17611751
self.hub_arn = hub_arn
17621752
self.model_type = model_type
1763-
self.hub_arn = hub_arn
17641753
self.region = region
17651754
self.inputs = inputs
17661755
self.wait = wait

tests/unit/sagemaker/hyperparameters/jumpstart/test_validate.py

-2
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,6 @@ def add_options_to_hyperparameter(*largs, **kwargs):
453453
s3_client=mock_client,
454454
hub_arn=None,
455455
model_type=JumpStartModelType.OPEN_WEIGHTS,
456-
hub_arn=None,
457456
)
458457

459458
patched_get_model_specs.reset_mock()
@@ -517,7 +516,6 @@ def test_jumpstart_validate_all_hyperparameters(
517516
s3_client=mock_client,
518517
hub_arn=None,
519518
model_type=JumpStartModelType.OPEN_WEIGHTS,
520-
hub_arn=None,
521519
)
522520

523521
patched_get_model_specs.reset_mock()

tests/unit/sagemaker/image_uris/jumpstart/test_common.py

-4
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ def test_jumpstart_common_image_uri(
5656
s3_client=mock_client,
5757
hub_arn=None,
5858
model_type=JumpStartModelType.OPEN_WEIGHTS,
59-
hub_arn=None,
6059
)
6160
patched_verify_model_region_and_return_specs.assert_called_once()
6261

@@ -79,7 +78,6 @@ def test_jumpstart_common_image_uri(
7978
s3_client=mock_client,
8079
hub_arn=None,
8180
model_type=JumpStartModelType.OPEN_WEIGHTS,
82-
hub_arn=None,
8381
)
8482
patched_verify_model_region_and_return_specs.assert_called_once()
8583

@@ -102,7 +100,6 @@ def test_jumpstart_common_image_uri(
102100
s3_client=mock_client,
103101
hub_arn=None,
104102
model_type=JumpStartModelType.OPEN_WEIGHTS,
105-
hub_arn=None,
106103
)
107104
patched_verify_model_region_and_return_specs.assert_called_once()
108105

@@ -125,7 +122,6 @@ def test_jumpstart_common_image_uri(
125122
s3_client=mock_client,
126123
hub_arn=None,
127124
model_type=JumpStartModelType.OPEN_WEIGHTS,
128-
hub_arn=None,
129125
)
130126
patched_verify_model_region_and_return_specs.assert_called_once()
131127

tests/unit/sagemaker/jumpstart/curated_hub/test_utils.py

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
from sagemaker.jumpstart.types import HubArnExtractedInfo
1717
from sagemaker.jumpstart.curated_hub import utils
1818
from sagemaker.jumpstart.constants import JUMPSTART_DEFAULT_REGION_NAME
19-
from sagemaker.jumpstart.curated_hub.types import HubArnExtractedInfo
2019

2120

2221
def test_get_info_from_hub_resource_arn():

tests/unit/sagemaker/jumpstart/test_notebook_utils.py

-1
Original file line numberDiff line numberDiff line change
@@ -751,5 +751,4 @@ def test_get_model_url(
751751
s3_client=DEFAULT_JUMPSTART_SAGEMAKER_SESSION.s3_client,
752752
hub_arn=None,
753753
model_type=JumpStartModelType.OPEN_WEIGHTS,
754-
hub_arn=None,
755754
)

tests/unit/sagemaker/model_uris/jumpstart/test_common.py

-4
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ def test_jumpstart_common_model_uri(
5454
s3_client=mock_client,
5555
hub_arn=None,
5656
model_type=JumpStartModelType.OPEN_WEIGHTS,
57-
hub_arn=None,
5857
)
5958
patched_verify_model_region_and_return_specs.assert_called_once()
6059

@@ -74,7 +73,6 @@ def test_jumpstart_common_model_uri(
7473
s3_client=mock_client,
7574
hub_arn=None,
7675
model_type=JumpStartModelType.OPEN_WEIGHTS,
77-
hub_arn=None,
7876
)
7977
patched_verify_model_region_and_return_specs.assert_called_once()
8078

@@ -95,7 +93,6 @@ def test_jumpstart_common_model_uri(
9593
s3_client=mock_client,
9694
hub_arn=None,
9795
model_type=JumpStartModelType.OPEN_WEIGHTS,
98-
hub_arn=None,
9996
)
10097
patched_verify_model_region_and_return_specs.assert_called_once()
10198

@@ -116,7 +113,6 @@ def test_jumpstart_common_model_uri(
116113
s3_client=mock_client,
117114
hub_arn=None,
118115
model_type=JumpStartModelType.OPEN_WEIGHTS,
119-
hub_arn=None,
120116
)
121117
patched_verify_model_region_and_return_specs.assert_called_once()
122118

tests/unit/sagemaker/resource_requirements/jumpstart/test_resource_requirements.py

-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ def test_jumpstart_resource_requirements(
5757
s3_client=mock_client,
5858
hub_arn=None,
5959
model_type=JumpStartModelType.OPEN_WEIGHTS,
60-
hub_arn=None,
6160
)
6261
patched_get_model_specs.reset_mock()
6362

tests/unit/sagemaker/script_uris/jumpstart/test_common.py

-4
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ def test_jumpstart_common_script_uri(
5252
model_id="pytorch-ic-mobilenet-v2",
5353
version="*",
5454
s3_client=mock_client,
55-
hub_arn=None,
5655
model_type=JumpStartModelType.OPEN_WEIGHTS,
5756
hub_arn=None,
5857
)
@@ -74,7 +73,6 @@ def test_jumpstart_common_script_uri(
7473
s3_client=mock_client,
7574
hub_arn=None,
7675
model_type=JumpStartModelType.OPEN_WEIGHTS,
77-
hub_arn=None,
7876
)
7977
patched_verify_model_region_and_return_specs.assert_called_once()
8078

@@ -95,7 +93,6 @@ def test_jumpstart_common_script_uri(
9593
s3_client=mock_client,
9694
hub_arn=None,
9795
model_type=JumpStartModelType.OPEN_WEIGHTS,
98-
hub_arn=None,
9996
)
10097
patched_verify_model_region_and_return_specs.assert_called_once()
10198

@@ -116,7 +113,6 @@ def test_jumpstart_common_script_uri(
116113
s3_client=mock_client,
117114
hub_arn=None,
118115
model_type=JumpStartModelType.OPEN_WEIGHTS,
119-
hub_arn=None,
120116
)
121117
patched_verify_model_region_and_return_specs.assert_called_once()
122118

0 commit comments

Comments
 (0)