sagemaker-core 1.0.41__tar.gz → 1.0.42__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of sagemaker-core might be problematic. Click here for more details.

Files changed (42) hide show
  1. {sagemaker_core-1.0.41/src/sagemaker_core.egg-info → sagemaker_core-1.0.42}/PKG-INFO +1 -1
  2. sagemaker_core-1.0.42/VERSION +1 -0
  3. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/src/sagemaker_core/main/code_injection/shape_dag.py +54 -0
  4. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/src/sagemaker_core/main/resources.py +120 -3
  5. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/src/sagemaker_core/main/shapes.py +34 -0
  6. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42/src/sagemaker_core.egg-info}/PKG-INFO +1 -1
  7. sagemaker_core-1.0.41/VERSION +0 -1
  8. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/LICENSE +0 -0
  9. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/README.rst +0 -0
  10. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/pyproject.toml +0 -0
  11. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/setup.cfg +0 -0
  12. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/src/sagemaker_core/__init__.py +0 -0
  13. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/src/sagemaker_core/_version.py +0 -0
  14. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/src/sagemaker_core/helper/__init__.py +0 -0
  15. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/src/sagemaker_core/helper/session_helper.py +0 -0
  16. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/src/sagemaker_core/main/__init__.py +0 -0
  17. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/src/sagemaker_core/main/code_injection/__init__.py +0 -0
  18. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/src/sagemaker_core/main/code_injection/base.py +0 -0
  19. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/src/sagemaker_core/main/code_injection/codec.py +0 -0
  20. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/src/sagemaker_core/main/code_injection/constants.py +0 -0
  21. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/src/sagemaker_core/main/config_schema.py +0 -0
  22. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/src/sagemaker_core/main/default_configs_helper.py +0 -0
  23. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/src/sagemaker_core/main/exceptions.py +0 -0
  24. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/src/sagemaker_core/main/logs.py +0 -0
  25. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/src/sagemaker_core/main/user_agent.py +0 -0
  26. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/src/sagemaker_core/main/utils.py +0 -0
  27. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/src/sagemaker_core/resources/__init__.py +0 -0
  28. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/src/sagemaker_core/shapes/__init__.py +0 -0
  29. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/src/sagemaker_core/tools/__init__.py +0 -0
  30. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/src/sagemaker_core/tools/codegen.py +0 -0
  31. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/src/sagemaker_core/tools/constants.py +0 -0
  32. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/src/sagemaker_core/tools/data_extractor.py +0 -0
  33. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/src/sagemaker_core/tools/method.py +0 -0
  34. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/src/sagemaker_core/tools/resources_codegen.py +0 -0
  35. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/src/sagemaker_core/tools/resources_extractor.py +0 -0
  36. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/src/sagemaker_core/tools/shapes_codegen.py +0 -0
  37. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/src/sagemaker_core/tools/shapes_extractor.py +0 -0
  38. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/src/sagemaker_core/tools/templates.py +0 -0
  39. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/src/sagemaker_core.egg-info/SOURCES.txt +0 -0
  40. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/src/sagemaker_core.egg-info/dependency_links.txt +0 -0
  41. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/src/sagemaker_core.egg-info/requires.txt +0 -0
  42. {sagemaker_core-1.0.41 → sagemaker_core-1.0.42}/src/sagemaker_core.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sagemaker-core
3
- Version: 1.0.41
3
+ Version: 1.0.42
4
4
  Summary: An python package for sagemaker core functionalities
5
5
  Author-email: AWS <sagemaker-interests@amazon.com>
6
6
  Project-URL: Repository, https://github.com/aws/sagemaker-core.git
@@ -0,0 +1 @@
1
+ 1.0.42
@@ -421,6 +421,18 @@ SHAPE_DAG = {
421
421
  "value_shape": "AuthenticationRequestExtraParamsValue",
422
422
  "value_type": "string",
423
423
  },
424
+ "AuthorizedUrl": {
425
+ "members": [
426
+ {"name": "Url", "shape": "LongS3Uri", "type": "string"},
427
+ {"name": "LocalPath", "shape": "LocalPath", "type": "string"},
428
+ ],
429
+ "type": "structure",
430
+ },
431
+ "AuthorizedUrlConfigs": {
432
+ "member_shape": "AuthorizedUrl",
433
+ "member_type": "structure",
434
+ "type": "list",
435
+ },
424
436
  "AutoMLAlgorithmConfig": {
425
437
  "members": [{"name": "AutoMLAlgorithms", "shape": "AutoMLAlgorithms", "type": "list"}],
426
438
  "type": "structure",
@@ -2300,6 +2312,25 @@ SHAPE_DAG = {
2300
2312
  "members": [{"name": "FlowDefinitionArn", "shape": "FlowDefinitionArn", "type": "string"}],
2301
2313
  "type": "structure",
2302
2314
  },
2315
+ "CreateHubContentPresignedUrlsRequest": {
2316
+ "members": [
2317
+ {"name": "HubName", "shape": "HubNameOrArn", "type": "string"},
2318
+ {"name": "HubContentType", "shape": "HubContentType", "type": "string"},
2319
+ {"name": "HubContentName", "shape": "HubContentName", "type": "string"},
2320
+ {"name": "HubContentVersion", "shape": "HubContentVersion", "type": "string"},
2321
+ {"name": "AccessConfig", "shape": "PresignedUrlAccessConfig", "type": "structure"},
2322
+ {"name": "MaxResults", "shape": "MaxResults", "type": "integer"},
2323
+ {"name": "NextToken", "shape": "NextToken", "type": "string"},
2324
+ ],
2325
+ "type": "structure",
2326
+ },
2327
+ "CreateHubContentPresignedUrlsResponse": {
2328
+ "members": [
2329
+ {"name": "AuthorizedUrlConfigs", "shape": "AuthorizedUrlConfigs", "type": "list"},
2330
+ {"name": "NextToken", "shape": "NextToken", "type": "string"},
2331
+ ],
2332
+ "type": "structure",
2333
+ },
2303
2334
  "CreateHubContentReferenceRequest": {
2304
2335
  "members": [
2305
2336
  {"name": "HubName", "shape": "HubNameOrArn", "type": "string"},
@@ -12282,6 +12313,13 @@ SHAPE_DAG = {
12282
12313
  "members": [{"name": "PredefinedMetricType", "shape": "String", "type": "string"}],
12283
12314
  "type": "structure",
12284
12315
  },
12316
+ "PresignedUrlAccessConfig": {
12317
+ "members": [
12318
+ {"name": "AcceptEula", "shape": "Boolean", "type": "boolean"},
12319
+ {"name": "ExpectedS3Url", "shape": "S3ModelUri", "type": "string"},
12320
+ ],
12321
+ "type": "structure",
12322
+ },
12285
12323
  "PriorityClass": {
12286
12324
  "members": [
12287
12325
  {"name": "Name", "shape": "ClusterSchedulerPriorityClassName", "type": "string"},
@@ -13861,12 +13899,14 @@ SHAPE_DAG = {
13861
13899
  {"name": "SpaceStorageSettings", "shape": "SpaceStorageSettings", "type": "structure"},
13862
13900
  {"name": "SpaceManagedResources", "shape": "FeatureStatus", "type": "string"},
13863
13901
  {"name": "CustomFileSystems", "shape": "CustomFileSystems", "type": "list"},
13902
+ {"name": "RemoteAccess", "shape": "FeatureStatus", "type": "string"},
13864
13903
  ],
13865
13904
  "type": "structure",
13866
13905
  },
13867
13906
  "SpaceSettingsSummary": {
13868
13907
  "members": [
13869
13908
  {"name": "AppType", "shape": "AppType", "type": "string"},
13909
+ {"name": "RemoteAccess", "shape": "FeatureStatus", "type": "string"},
13870
13910
  {"name": "SpaceStorageSettings", "shape": "SpaceStorageSettings", "type": "structure"},
13871
13911
  ],
13872
13912
  "type": "structure",
@@ -13966,6 +14006,20 @@ SHAPE_DAG = {
13966
14006
  ],
13967
14007
  "type": "structure",
13968
14008
  },
14009
+ "StartSessionRequest": {
14010
+ "members": [
14011
+ {"name": "ResourceIdentifier", "shape": "ResourceIdentifier", "type": "string"}
14012
+ ],
14013
+ "type": "structure",
14014
+ },
14015
+ "StartSessionResponse": {
14016
+ "members": [
14017
+ {"name": "SessionId", "shape": "SessionId", "type": "string"},
14018
+ {"name": "StreamUrl", "shape": "StreamUrl", "type": "string"},
14019
+ {"name": "TokenValue", "shape": "TokenValue", "type": "string"},
14020
+ ],
14021
+ "type": "structure",
14022
+ },
13969
14023
  "StopAutoMLJobRequest": {
13970
14024
  "members": [{"name": "AutoMLJobName", "shape": "AutoMLJobName", "type": "string"}],
13971
14025
  "type": "structure",
@@ -7402,9 +7402,9 @@ class Domain(Base):
7402
7402
  domain_name: str,
7403
7403
  auth_mode: str,
7404
7404
  default_user_settings: shapes.UserSettings,
7405
- subnet_ids: List[str],
7406
- vpc_id: str,
7407
7405
  domain_settings: Optional[shapes.DomainSettings] = Unassigned(),
7406
+ subnet_ids: Optional[List[str]] = Unassigned(),
7407
+ vpc_id: Optional[str] = Unassigned(),
7408
7408
  tags: Optional[List[shapes.Tag]] = Unassigned(),
7409
7409
  app_network_access_type: Optional[str] = Unassigned(),
7410
7410
  home_efs_file_system_kms_key_id: Optional[str] = Unassigned(),
@@ -7422,9 +7422,9 @@ class Domain(Base):
7422
7422
  domain_name: A name for the domain.
7423
7423
  auth_mode: The mode of authentication that members use to access the domain.
7424
7424
  default_user_settings: The default settings to use to create a user profile when UserSettings isn't specified in the call to the CreateUserProfile API. SecurityGroups is aggregated when specified in both calls. For all other settings in UserSettings, the values specified in CreateUserProfile take precedence over those specified in CreateDomain.
7425
+ domain_settings: A collection of Domain settings.
7425
7426
  subnet_ids: The VPC subnets that the domain uses for communication.
7426
7427
  vpc_id: The ID of the Amazon Virtual Private Cloud (VPC) that the domain uses for communication.
7427
- domain_settings: A collection of Domain settings.
7428
7428
  tags: Tags to associated with the Domain. Each tag consists of a key and an optional value. Tag keys must be unique per resource. Tags are searchable using the Search API. Tags that you specify for the Domain are also added to all Apps that the Domain launches.
7429
7429
  app_network_access_type: Specifies the VPC used for non-EFS traffic. The default value is PublicInternetOnly. PublicInternetOnly - Non-EFS traffic is through a VPC managed by Amazon SageMaker AI, which allows direct internet access VpcOnly - All traffic is through the specified VPC and subnets
7430
7430
  home_efs_file_system_kms_key_id: Use KmsKeyId.
@@ -12765,6 +12765,116 @@ class HubContent(Base):
12765
12765
  )
12766
12766
 
12767
12767
 
12768
+ class HubContentPresignedUrls(Base):
12769
+ """
12770
+ Class representing resource HubContentPresignedUrls
12771
+
12772
+ Attributes:
12773
+ hub_name: The name or Amazon Resource Name (ARN) of the hub that contains the content. For public content, use SageMakerPublicHub.
12774
+ hub_content_type: The type of hub content to access. Valid values include Model, Notebook, and ModelReference.
12775
+ hub_content_name: The name of the hub content for which to generate presigned URLs. This identifies the specific model or content within the hub.
12776
+ authorized_url_configs: An array of authorized URL configurations, each containing a presigned URL and its corresponding local file path for proper file organization during download.
12777
+ hub_content_version: The version of the hub content. If not specified, the latest version is used.
12778
+ access_config: Configuration settings for accessing the hub content, including end-user license agreement acceptance for gated models and expected S3 URL validation.
12779
+ max_results: The maximum number of presigned URLs to return in the response. Default value is 100. Large models may contain hundreds of files, requiring pagination to retrieve all URLs.
12780
+ next_token: A token for pagination. If present, indicates that more presigned URLs are available. Use this token in a subsequent request to retrieve additional URLs.
12781
+
12782
+ """
12783
+
12784
+ hub_name: Union[str, object]
12785
+ hub_content_type: str
12786
+ hub_content_name: Union[str, object]
12787
+ authorized_url_configs: List[shapes.AuthorizedUrl]
12788
+ hub_content_version: Optional[str] = Unassigned()
12789
+ access_config: Optional[shapes.PresignedUrlAccessConfig] = Unassigned()
12790
+ max_results: Optional[int] = Unassigned()
12791
+ next_token: Optional[str] = Unassigned()
12792
+
12793
+ def get_name(self) -> str:
12794
+ attributes = vars(self)
12795
+ resource_name = "hub_content_presigned_urls_name"
12796
+ resource_name_split = resource_name.split("_")
12797
+ attribute_name_candidates = []
12798
+
12799
+ l = len(resource_name_split)
12800
+ for i in range(0, l):
12801
+ attribute_name_candidates.append("_".join(resource_name_split[i:l]))
12802
+
12803
+ for attribute, value in attributes.items():
12804
+ if attribute == "name" or attribute in attribute_name_candidates:
12805
+ return value
12806
+ logger.error("Name attribute not found for object hub_content_presigned_urls")
12807
+ return None
12808
+
12809
+ @classmethod
12810
+ @Base.add_validate_call
12811
+ def create(
12812
+ cls,
12813
+ hub_name: Union[str, object],
12814
+ hub_content_type: str,
12815
+ hub_content_name: Union[str, object],
12816
+ hub_content_version: Optional[str] = Unassigned(),
12817
+ access_config: Optional[shapes.PresignedUrlAccessConfig] = Unassigned(),
12818
+ max_results: Optional[int] = Unassigned(),
12819
+ next_token: Optional[str] = Unassigned(),
12820
+ ) -> Optional["HubContentPresignedUrls"]:
12821
+ """
12822
+ Create a HubContentPresignedUrls resource
12823
+
12824
+ Parameters:
12825
+ hub_name: The name or Amazon Resource Name (ARN) of the hub that contains the content. For public content, use SageMakerPublicHub.
12826
+ hub_content_type: The type of hub content to access. Valid values include Model, Notebook, and ModelReference.
12827
+ hub_content_name: The name of the hub content for which to generate presigned URLs. This identifies the specific model or content within the hub.
12828
+ hub_content_version: The version of the hub content. If not specified, the latest version is used.
12829
+ access_config: Configuration settings for accessing the hub content, including end-user license agreement acceptance for gated models and expected S3 URL validation.
12830
+ max_results: The maximum number of presigned URLs to return in the response. Default value is 100. Large models may contain hundreds of files, requiring pagination to retrieve all URLs.
12831
+ next_token: A token for pagination. Use this token to retrieve the next set of presigned URLs when the response is truncated.
12832
+ session: Boto3 session.
12833
+ region: Region name.
12834
+
12835
+ Returns:
12836
+ The HubContentPresignedUrls resource.
12837
+
12838
+ Raises:
12839
+ botocore.exceptions.ClientError: This exception is raised for AWS service related errors.
12840
+ The error message and error code can be parsed from the exception as follows:
12841
+ ```
12842
+ try:
12843
+ # AWS service call here
12844
+ except botocore.exceptions.ClientError as e:
12845
+ error_message = e.response['Error']['Message']
12846
+ error_code = e.response['Error']['Code']
12847
+ ```
12848
+ ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema
12849
+ LocalConfigNotFoundError: Raised when a configuration file is not found in local file system
12850
+ S3ConfigNotFoundError: Raised when a configuration file is not found in S3
12851
+ """
12852
+
12853
+ operation_input_args = {
12854
+ "HubName": hub_name,
12855
+ "HubContentType": hub_content_type,
12856
+ "HubContentName": hub_content_name,
12857
+ "HubContentVersion": hub_content_version,
12858
+ "AccessConfig": access_config,
12859
+ "MaxResults": max_results,
12860
+ "NextToken": next_token,
12861
+ }
12862
+ # serialize the input request
12863
+ operation_input_args = serialize(operation_input_args)
12864
+ logger.debug(f"Serialized input request: {operation_input_args}")
12865
+
12866
+ client = Base.get_sagemaker_client(
12867
+ session=session, region_name=region, service_name="sagemaker"
12868
+ )
12869
+
12870
+ logger.debug(f"Calling create_hub_content_presigned_urls API")
12871
+ response = client.create_hub_content_presigned_urls(**operation_input_args)
12872
+ logger.debug(f"Response: {response}")
12873
+
12874
+ transformed_response = transform(response, "CreateHubContentPresignedUrlsResponse")
12875
+ return cls(**operation_input_args, **transformed_response)
12876
+
12877
+
12768
12878
  class HubContentReference(Base):
12769
12879
  """
12770
12880
  Class representing resource HubContentReference
@@ -26953,6 +27063,13 @@ class SagemakerServicecatalogPortfolio(Base):
26953
27063
  return list(response.values())[0]
26954
27064
 
26955
27065
 
27066
+ class Session(Base):
27067
+ """
27068
+ Class representing resource Session
27069
+
27070
+ """
27071
+
27072
+
26956
27073
  class Space(Base):
26957
27074
  """
26958
27075
  Class representing resource Space
@@ -1652,6 +1652,21 @@ class AthenaDatasetDefinition(Base):
1652
1652
  output_compression: Optional[str] = Unassigned()
1653
1653
 
1654
1654
 
1655
+ class AuthorizedUrl(Base):
1656
+ """
1657
+ AuthorizedUrl
1658
+ Contains a presigned URL and its associated local file path for downloading hub content artifacts.
1659
+
1660
+ Attributes
1661
+ ----------------------
1662
+ url: The presigned S3 URL that provides temporary, secure access to download the file. URLs expire within 15 minutes for security purposes.
1663
+ local_path: The recommended local file path where the downloaded file should be stored to maintain proper directory structure and file organization.
1664
+ """
1665
+
1666
+ url: Optional[str] = Unassigned()
1667
+ local_path: Optional[str] = Unassigned()
1668
+
1669
+
1655
1670
  class AutoMLAlgorithmConfig(Base):
1656
1671
  """
1657
1672
  AutoMLAlgorithmConfig
@@ -5451,6 +5466,21 @@ class FlowDefinitionOutputConfig(Base):
5451
5466
  kms_key_id: Optional[str] = Unassigned()
5452
5467
 
5453
5468
 
5469
+ class PresignedUrlAccessConfig(Base):
5470
+ """
5471
+ PresignedUrlAccessConfig
5472
+ Configuration for accessing hub content through presigned URLs, including license agreement acceptance and URL validation settings.
5473
+
5474
+ Attributes
5475
+ ----------------------
5476
+ accept_eula: Indicates acceptance of the End User License Agreement (EULA) for gated models. Set to true to acknowledge acceptance of the license terms required for accessing gated content.
5477
+ expected_s3_url: The expected S3 URL prefix for validation purposes. This parameter helps ensure consistency between the resolved S3 URIs and the deployment configuration, reducing potential compatibility issues.
5478
+ """
5479
+
5480
+ accept_eula: Optional[bool] = Unassigned()
5481
+ expected_s3_url: Optional[str] = Unassigned()
5482
+
5483
+
5454
5484
  class HubS3StorageConfig(Base):
5455
5485
  """
5456
5486
  HubS3StorageConfig
@@ -7626,6 +7656,7 @@ class SpaceSettings(Base):
7626
7656
  space_storage_settings: The storage settings for a space.
7627
7657
  space_managed_resources: If you enable this option, SageMaker AI creates the following resources on your behalf when you create the space: The user profile that possesses the space. The app that the space contains.
7628
7658
  custom_file_systems: A file system, created by you, that you assign to a space for an Amazon SageMaker AI Domain. Permitted users can access this file system in Amazon SageMaker AI Studio.
7659
+ remote_access: A setting that enables or disables remote access for a SageMaker space. When enabled, this allows you to connect to the remote space from your local IDE.
7629
7660
  """
7630
7661
 
7631
7662
  jupyter_server_app_settings: Optional[JupyterServerAppSettings] = Unassigned()
@@ -7636,6 +7667,7 @@ class SpaceSettings(Base):
7636
7667
  space_storage_settings: Optional[SpaceStorageSettings] = Unassigned()
7637
7668
  space_managed_resources: Optional[str] = Unassigned()
7638
7669
  custom_file_systems: Optional[List[CustomFileSystem]] = Unassigned()
7670
+ remote_access: Optional[str] = Unassigned()
7639
7671
 
7640
7672
 
7641
7673
  class OwnershipSettings(Base):
@@ -11572,10 +11604,12 @@ class SpaceSettingsSummary(Base):
11572
11604
  Attributes
11573
11605
  ----------------------
11574
11606
  app_type: The type of app created within the space.
11607
+ remote_access: A setting that enables or disables remote access for a SageMaker space. When enabled, this allows you to connect to the remote space from your local IDE.
11575
11608
  space_storage_settings: The storage settings for a space.
11576
11609
  """
11577
11610
 
11578
11611
  app_type: Optional[str] = Unassigned()
11612
+ remote_access: Optional[str] = Unassigned()
11579
11613
  space_storage_settings: Optional[SpaceStorageSettings] = Unassigned()
11580
11614
 
11581
11615
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sagemaker-core
3
- Version: 1.0.41
3
+ Version: 1.0.42
4
4
  Summary: An python package for sagemaker core functionalities
5
5
  Author-email: AWS <sagemaker-interests@amazon.com>
6
6
  Project-URL: Repository, https://github.com/aws/sagemaker-core.git
@@ -1 +0,0 @@
1
- 1.0.41
File without changes