Skip to content

Commit 5f24036

Browse files
committed
curated_hub/types.py to types.py
1 parent edb887e commit 5f24036

File tree

7 files changed

+220
-244
lines changed

7 files changed

+220
-244
lines changed

src/sagemaker/jumpstart/cache.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,9 @@
4545
JumpStartModelSpecs,
4646
JumpStartS3FileType,
4747
JumpStartVersionedModelId,
48-
)
49-
from sagemaker.jumpstart.curated_hub.types import (
5048
DescribeHubResponse,
5149
DescribeHubContentsResponse,
50+
HubType,
5251
HubContentType,
5352
)
5453
from sagemaker.jumpstart.curated_hub import utils as hub_utils
@@ -362,7 +361,7 @@ def _retrieval_function(
362361
return JumpStartCachedContentValue(
363362
formatted_content=model_specs
364363
)
365-
if data_type == HubContentType.HUB:
364+
if data_type == HubType.HUB:
366365
hub_name, region, _, _ = hub_utils.get_info_from_hub_resource_arn(id_info)
367366
hub: CuratedHub = CuratedHub(hub_name=hub_name, region=region)
368367
hub_description: DescribeHubResponse = hub.describe()

src/sagemaker/jumpstart/curated_hub/curated_hub.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
from typing import Any, Dict, Optional
1818
from sagemaker.session import Session
1919
from sagemaker.jumpstart.constants import DEFAULT_JUMPSTART_SAGEMAKER_SESSION
20-
from sagemaker.jumpstart.curated_hub.utils import create_hub_bucket_if_it_does_not_exist
21-
from sagemaker.jumpstart.curated_hub.types import (
20+
from sagemaker.jumpstart.types import (
2221
DescribeHubResponse,
2322
DescribeHubContentsResponse,
2423
HubContentType,
2524
)
25+
from sagemaker.jumpstart.curated_hub.utils import create_hub_bucket_if_it_does_not_exist
2626

2727

2828
class CuratedHub:

src/sagemaker/jumpstart/curated_hub/types.py

Lines changed: 0 additions & 230 deletions
This file was deleted.

src/sagemaker/jumpstart/curated_hub/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
from typing import Optional
1717
from sagemaker.session import Session
1818
from sagemaker.utils import aws_partition
19-
from sagemaker.jumpstart import constants
20-
from sagemaker.jumpstart.curated_hub.types import (
19+
from sagemaker.jumpstart.types import (
2120
HubContentType,
2221
HubArnExtractedInfo,
2322
)
23+
from sagemaker.jumpstart import constants
2424

2525

2626
def get_info_from_hub_resource_arn(

0 commit comments

Comments
 (0)