sagemaker-core 1.0.36__py3-none-any.whl → 1.0.38__py3-none-any.whl

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.
@@ -29,7 +29,7 @@ from sagemaker_core.main.config_schema import SAGEMAKER_PYTHON_SDK_CONFIG_SCHEMA
29
29
  from sagemaker_core.main.exceptions import (
30
30
  LocalConfigNotFoundError,
31
31
  S3ConfigNotFoundError,
32
- IntelligentDefaultsError,
32
+ DefaultConfigsError,
33
33
  ConfigSchemaValidationError,
34
34
  )
35
35
  from sagemaker_core.main.utils import get_textual_rich_logger
@@ -116,7 +116,7 @@ def _load_config_from_s3(s3_uri, s3_resource_for_config) -> dict:
116
116
  boto_session = boto3.DEFAULT_SESSION or boto3.Session()
117
117
  boto_region_name = boto_session.region_name
118
118
  if boto_region_name is None:
119
- raise IntelligentDefaultsError(
119
+ raise DefaultConfigsError(
120
120
  message=(
121
121
  "Valid region is not provided in the Boto3 session."
122
122
  + "Setup local AWS configuration with a valid region supported by SageMaker."
@@ -91,21 +91,21 @@ class TimeoutExceededError(WaiterError):
91
91
  super().__init__(resource_type=resource_type, status=status, reason=reason)
92
92
 
93
93
 
94
- ### Intelligent Defaults Errors
95
- class IntelligentDefaultsError(SageMakerCoreError):
96
- """Raised when an error occurs in the Intelligent Defaults"""
94
+ ### Default Configs Errors
95
+ class DefaultConfigsError(SageMakerCoreError):
96
+ """Raised when an error occurs in the Default Configs"""
97
97
 
98
- fmt = "An error occurred while loading Intelligent Default. {message}"
98
+ fmt = "An error occurred while loading Default Configs. {message}"
99
99
 
100
100
  def __init__(self, message="", **kwargs):
101
- """Initialize an IntelligentDefaultsError exception.
101
+ """Initialize an DefaultConfigsError exception.
102
102
  Args:
103
103
  message (str): A message describing the error.
104
104
  """
105
105
  super().__init__(message=message, **kwargs)
106
106
 
107
107
 
108
- class LocalConfigNotFoundError(IntelligentDefaultsError):
108
+ class LocalConfigNotFoundError(DefaultConfigsError):
109
109
  """Raised when a configuration file is not found in local file system"""
110
110
 
111
111
  fmt = "Failed to load configuration file from location: {file_path}. {message}"
@@ -119,7 +119,7 @@ class LocalConfigNotFoundError(IntelligentDefaultsError):
119
119
  super().__init__(file_path=file_path, message=message)
120
120
 
121
121
 
122
- class S3ConfigNotFoundError(IntelligentDefaultsError):
122
+ class S3ConfigNotFoundError(DefaultConfigsError):
123
123
  """Raised when a configuration file is not found in S3"""
124
124
 
125
125
  fmt = "Failed to load configuration file from S3 location: {s3_uri}. {message}"
@@ -133,7 +133,7 @@ class S3ConfigNotFoundError(IntelligentDefaultsError):
133
133
  super().__init__(s3_uri=s3_uri, message=message)
134
134
 
135
135
 
136
- class ConfigSchemaValidationError(IntelligentDefaultsError, ValidationError):
136
+ class ConfigSchemaValidationError(DefaultConfigsError, ValidationError):
137
137
  """Raised when a configuration file does not adhere to the schema"""
138
138
 
139
139
  fmt = "Failed to validate configuration file from location: {file_path}. {message}"
@@ -37,7 +37,7 @@ from sagemaker_core.main.utils import (
37
37
  is_primitive_list,
38
38
  serialize,
39
39
  )
40
- from sagemaker_core.main.intelligent_defaults_helper import (
40
+ from sagemaker_core.main.default_configs_helper import (
41
41
  load_default_configs_for_resource_name,
42
42
  get_config_value,
43
43
  )
@@ -868,7 +868,7 @@ class S3DataSource(Base):
868
868
 
869
869
  Attributes
870
870
  ----------------------
871
- s3_data_type: If you choose S3Prefix, S3Uri identifies a key name prefix. SageMaker uses all objects that match the specified key name prefix for model training. If you choose ManifestFile, S3Uri identifies an object that is a manifest file containing a list of object keys that you want SageMaker to use for model training. If you choose AugmentedManifestFile, S3Uri identifies an object that is an augmented manifest file in JSON lines format. This file contains the data you want to use for model training. AugmentedManifestFile can only be used if the Channel's input mode is Pipe.
871
+ s3_data_type: If you choose S3Prefix, S3Uri identifies a key name prefix. SageMaker uses all objects that match the specified key name prefix for model training. If you choose ManifestFile, S3Uri identifies an object that is a manifest file containing a list of object keys that you want SageMaker to use for model training. If you choose AugmentedManifestFile, S3Uri identifies an object that is an augmented manifest file in JSON lines format. This file contains the data you want to use for model training. AugmentedManifestFile can only be used if the Channel's input mode is Pipe. If you choose Converse, S3Uri identifies an Amazon S3 location that contains data formatted according to Converse format. This format structures conversational messages with specific roles and content types used for training and fine-tuning foundational models.
872
872
  s3_uri: Depending on the value specified for the S3DataType, identifies either a key name prefix or a manifest. For example: A key name prefix might look like this: s3://bucketname/exampleprefix/ A manifest might look like this: s3://bucketname/example.manifest A manifest is an S3 object which is a JSON file consisting of an array of elements. The first element is a prefix which is followed by one or more suffixes. SageMaker appends the suffix elements to the prefix to get a full set of S3Uri. Note that the prefix must be a valid non-empty S3Uri that precludes users from specifying a manifest whose individual S3Uri is sourced from different S3 buckets. The following code example shows a valid manifest format: [ {"prefix": "s3://customer_bucket/some/prefix/"}, "relative/path/to/custdata-1", "relative/path/custdata-2", ... "relative/path/custdata-N" ] This JSON is equivalent to the following S3Uri list: s3://customer_bucket/some/prefix/relative/path/to/custdata-1 s3://customer_bucket/some/prefix/relative/path/custdata-2 ... s3://customer_bucket/some/prefix/relative/path/custdata-N The complete set of S3Uri in this manifest is the input data for the channel for this data source. The object that each S3Uri points to must be readable by the IAM role that SageMaker uses to perform tasks on your behalf. Your input bucket must be located in same Amazon Web Services region as your training job.
873
873
  s3_data_distribution_type: If you want SageMaker to replicate the entire dataset on each ML compute instance that is launched for model training, specify FullyReplicated. If you want SageMaker to replicate a subset of data on each ML compute instance that is launched for model training, specify ShardedByS3Key. If there are n ML compute instances launched for a training job, each instance gets approximately 1/n of the number of S3 objects. In this case, model training on each machine uses only the subset of training data. Don't choose more ML compute instances for training than available S3 objects. If you do, some nodes won't get any data and you will pay for nodes that aren't getting any training data. This applies in both File and Pipe modes. Keep this in mind when developing algorithms. In distributed training, where you use multiple ML compute EC2 instances, you might choose ShardedByS3Key. If the algorithm requires copying training data to the ML storage volume (when TrainingInputMode is set to File), this copies 1/n of the number of objects.
874
874
  attribute_names: A list of one or more attribute names to use that are found in a specified augmented manifest file.
@@ -88,7 +88,7 @@ METRICS_SERVICE_JSON_FILE_PATH = os.getcwd() + "/sample/sagemaker-metrics/2022-0
88
88
 
89
89
  GENERATED_CLASSES_LOCATION = os.getcwd() + "/src/sagemaker_core/main"
90
90
  UTILS_CODEGEN_FILE_NAME = "utils.py"
91
- INTELLIGENT_DEFAULTS_HELPER_CODEGEN_FILE_NAME = "intelligent_defaults_helper.py"
91
+ DEFAULT_CONFIGS_CODEGEN_FILE_NAME = "default_configs_helper.py"
92
92
 
93
93
  RESOURCES_CODEGEN_FILE_NAME = "resources.py"
94
94
 
@@ -17,7 +17,7 @@ import os
17
17
  import json
18
18
  from sagemaker_core.main.code_injection.codec import pascal_to_snake
19
19
  from sagemaker_core.main.config_schema import SAGEMAKER_PYTHON_SDK_CONFIG_SCHEMA
20
- from sagemaker_core.main.exceptions import IntelligentDefaultsError
20
+ from sagemaker_core.main.exceptions import DefaultConfigsError
21
21
  from sagemaker_core.main.utils import get_textual_rich_logger
22
22
  from sagemaker_core.tools.constants import (
23
23
  BASIC_RETURN_TYPES,
@@ -190,7 +190,7 @@ class ResourcesCodeGen:
190
190
  "from sagemaker_core.main.code_injection.constants import Color",
191
191
  "from sagemaker_core.main.utils import SageMakerClient, ResourceIterator, Unassigned, get_textual_rich_logger, "
192
192
  "snake_to_pascal, pascal_to_snake, is_not_primitive, is_not_str_dict, is_primitive_list, serialize",
193
- "from sagemaker_core.main.intelligent_defaults_helper import load_default_configs_for_resource_name, get_config_value",
193
+ "from sagemaker_core.main.default_configs_helper import load_default_configs_for_resource_name, get_config_value",
194
194
  "from sagemaker_core.main.logs import MultiLogStreamHandler",
195
195
  "from sagemaker_core.main.exceptions import *",
196
196
  "import sagemaker_core.main.shapes as shapes",
@@ -859,7 +859,7 @@ class ResourcesCodeGen:
859
859
  operation_input_shape_name=operation_input_shape_name,
860
860
  include_session_region=True,
861
861
  include_return_resource_docstring=True,
862
- include_intelligent_defaults_errors=True,
862
+ include_default_configs_errors=True,
863
863
  )
864
864
 
865
865
  if "Describe" + resource_name in self.operations:
@@ -956,7 +956,7 @@ class ResourcesCodeGen:
956
956
  include_session_region: bool = False,
957
957
  include_return_resource_docstring: bool = False,
958
958
  return_string: str = None,
959
- include_intelligent_defaults_errors: bool = False,
959
+ include_default_configs_errors: bool = False,
960
960
  exclude_resource_attrs: list = None,
961
961
  ) -> str:
962
962
  """
@@ -970,7 +970,7 @@ class ResourcesCodeGen:
970
970
  include_session_region (bool): Whether to include session and region documentation.
971
971
  include_return_resource_docstring (bool): Whether to include resource-specific documentation.
972
972
  return_string (str): The return string.
973
- include_intelligent_defaults_errors (bool): Whether to include intelligent defaults errors.
973
+ include_default_configs_errors (bool): Whether to include default configs errors.
974
974
  exclude_resource_attrs (list): A list of attributes to exclude from the docstring.
975
975
 
976
976
  Returns:
@@ -1000,8 +1000,8 @@ class ResourcesCodeGen:
1000
1000
 
1001
1001
  docstring += self._exception_docstring(operation_name)
1002
1002
 
1003
- if include_intelligent_defaults_errors:
1004
- subclasses = set(IntelligentDefaultsError.__subclasses__())
1003
+ if include_default_configs_errors:
1004
+ subclasses = set(DefaultConfigsError.__subclasses__())
1005
1005
  _id_exception_docstrings = [
1006
1006
  f"\n {subclass.__name__}: {subclass.__doc__}" for subclass in subclasses
1007
1007
  ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sagemaker-core
3
- Version: 1.0.36
3
+ Version: 1.0.38
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
@@ -63,13 +63,13 @@ Key Features
63
63
  * **Abstraction of Low-Level Details**: Automatically handles resource state transitions and polling logic, freeing developers from managing these intricacies and allowing them to focus on higher-level tasks.
64
64
  * **Auto Code Completion**: Enhances the developer experience by offering real-time suggestions and completions in popular IDEs, reducing syntax errors and speeding up the coding process.
65
65
  * **Comprehensive Documentation and Type Hints**: Provides detailed guidance and type hints to help developers understand functionalities, write code faster, and reduce errors without complex API navigation.
66
- * **Incorporation of Intelligent Defaults**: Integrates the previous SageMaker SDK feature of intelligent defaults, allowing developers to set default values for parameters like IAM roles and VPC configurations. This streamlines the setup process, enabling developers to focus on customizations specific to their use case.
66
+ * **Incorporation of Default Configs**: Integrates the previous SageMaker SDK feature of default configs, allowing developers to set default values for parameters like IAM roles and VPC configurations. This streamlines the setup process, enabling developers to focus on customizations specific to their use case.
67
67
 
68
68
 
69
69
  Benefits
70
70
  --------
71
71
 
72
- * **Simplified Development**: By abstracting low-level details and providing intelligent defaults, developers can focus on building and deploying machine learning models without getting bogged down by repetitive tasks.
72
+ * **Simplified Development**: By abstracting low-level details and providing default configs, developers can focus on building and deploying machine learning models without getting bogged down by repetitive tasks.
73
73
  * **Increased Productivity**: The SDK's features, such as auto code completion and type hints, help developers write code faster and with fewer errors.
74
74
  * **Enhanced Readability**: Resource chaining and dedicated resource classes result in more readable and maintainable code.
75
75
 
@@ -4,11 +4,11 @@ sagemaker_core/helper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
4
4
  sagemaker_core/helper/session_helper.py,sha256=GO1UJgpN1L9a25nYlVb-KWk4KvmFzVkLqFMqw-VaI4c,33126
5
5
  sagemaker_core/main/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  sagemaker_core/main/config_schema.py,sha256=Wxe2gJash1rrxBomGhSYmII1LmJ3E70LIuSWklX4_7g,57588
7
- sagemaker_core/main/exceptions.py,sha256=87DUlrmHxaWoiYNlpNY9ixxFMPRk_dIGPsA2e_xdVwQ,5602
8
- sagemaker_core/main/intelligent_defaults_helper.py,sha256=5SDM6UavZtp-k5LhqRL7GRIDgzFB5UsC_p7YuiSPK9A,8334
7
+ sagemaker_core/main/default_configs_helper.py,sha256=bg_tgczX_bYzNiSlalJ6TWPTgrQYsI0uZguP5TIbPiw,8324
8
+ sagemaker_core/main/exceptions.py,sha256=CsiM3V_Gb16grBotnu59LB6tznryPcSvAQDAOOYGc10,5563
9
9
  sagemaker_core/main/logs.py,sha256=yfEH7uP91nbE1lefymOlBr81ziBzsDSIOF2Qyd54FJE,6241
10
- sagemaker_core/main/resources.py,sha256=dNDFf5ANJ8NrVd5sy3Onr_W4Ls-0UEw7RsER7vyLOg8,1428074
11
- sagemaker_core/main/shapes.py,sha256=H4U1MbZ4Y2uot83EdW76wSj3wRNh95R5sYMxz1gzkSY,743064
10
+ sagemaker_core/main/resources.py,sha256=MC0e1l0Pyr5Nw2FS6wLRdeRxGkF7P8VM54P0XxCNhs0,1428069
11
+ sagemaker_core/main/shapes.py,sha256=zmVV-dQqNskxOxOawpnY08U3XhlJf3NUEQAvrvYmSgg,743326
12
12
  sagemaker_core/main/user_agent.py,sha256=BPYDAfDd70ObP-VAjl7aDHALHyGknkpRP21ktVr_LDw,2744
13
13
  sagemaker_core/main/utils.py,sha256=Ge_KdFKWo-qoIXlXkgLbaJbfXMVdUVHTq6BbDQn48Tw,19201
14
14
  sagemaker_core/main/code_injection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -20,16 +20,16 @@ sagemaker_core/resources/__init__.py,sha256=EAYTFMN-nPjnPjjBbhIUeaL67FLKNPd7qbcb
20
20
  sagemaker_core/shapes/__init__.py,sha256=RnbIu9eTxKt-DNsOFJabrWIgrrtS9_SdAozP9JBl_ic,28
21
21
  sagemaker_core/tools/__init__.py,sha256=xX79JImxCVzrWMnjgntLCve2G5I-R4pRar5s20kT9Rs,56
22
22
  sagemaker_core/tools/codegen.py,sha256=mKWVi2pWnPxyIoWUEPYjEc9Gw7D9bCOrHqa00yzIZ1o,2005
23
- sagemaker_core/tools/constants.py,sha256=XEwsUJ4w952mpnk-K0TS7R2uJhZyVPjcR47nrzgVXtg,3483
23
+ sagemaker_core/tools/constants.py,sha256=OEL9n7G1DZ1YKZMtSxcYwFfZ8WQG1gm-c_gKjRtt0fI,3466
24
24
  sagemaker_core/tools/data_extractor.py,sha256=pNfmTA0NUA96IgfLrla7a36Qjc1NljbwgZYaOhouKqQ,2113
25
25
  sagemaker_core/tools/method.py,sha256=Ud2YeH2SPkj7xtIxBuUdRfQwCmovMUzGGkcIvzhpQeQ,805
26
- sagemaker_core/tools/resources_codegen.py,sha256=jYhbGQ0X5xuQGgIJp6UOHY_RU-PsLFe4JfpdjL1lPCk,86445
26
+ sagemaker_core/tools/resources_codegen.py,sha256=W0MHoAk26t_bRwV4_hUOJwT75Lja4R4-1uq49fPHkKc,86405
27
27
  sagemaker_core/tools/resources_extractor.py,sha256=hN61ehZbPnhFW-2FIVDi7NsEz4rLvGr-WoglHQGfrug,14523
28
28
  sagemaker_core/tools/shapes_codegen.py,sha256=4lsePZpjk7M6RpJs5yar_m4z5MzwGHFrvCkdS_-R12c,12172
29
29
  sagemaker_core/tools/shapes_extractor.py,sha256=vxVKjXD3lmjrkoKiexjUnOt8ITbFxQSeiDtx7P6Qtkw,14226
30
30
  sagemaker_core/tools/templates.py,sha256=0lOIH3Rq2CXWkQhK6VenN_TE_v5p852s2kQyb_BeQxA,23460
31
- sagemaker_core-1.0.36.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
32
- sagemaker_core-1.0.36.dist-info/METADATA,sha256=7wwEVAYUTGJfEbQQwBdMrWxylyIjk5ymE3CDcUceO2s,4885
33
- sagemaker_core-1.0.36.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
34
- sagemaker_core-1.0.36.dist-info/top_level.txt,sha256=R3GAZZ1zC5JxqdE_0x2Lu_WYi2Xfke7VsiP3L5zngfA,15
35
- sagemaker_core-1.0.36.dist-info/RECORD,,
31
+ sagemaker_core-1.0.38.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
32
+ sagemaker_core-1.0.38.dist-info/METADATA,sha256=CB4aU4tTIAw8wleQzsIbLxD3mznwHVozdvCnFZVQ8sc,4870
33
+ sagemaker_core-1.0.38.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
34
+ sagemaker_core-1.0.38.dist-info/top_level.txt,sha256=R3GAZZ1zC5JxqdE_0x2Lu_WYi2Xfke7VsiP3L5zngfA,15
35
+ sagemaker_core-1.0.38.dist-info/RECORD,,