sagemaker-core 1.0.38__py3-none-any.whl → 1.0.62__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.
@@ -146,7 +146,7 @@ def get_textual_rich_theme() -> Theme:
146
146
  textual_rich_console_and_traceback_enabled = False
147
147
 
148
148
 
149
- def enable_textual_rich_console_and_traceback():
149
+ def enable_rich_logging():
150
150
  """
151
151
  Reconfigure the global textual rich console with the customized theme
152
152
  and enable textual rich error traceback
@@ -180,7 +180,7 @@ def get_textual_rich_logger(name: str, log_level: str = "INFO") -> logging.Logge
180
180
  logging.Logger: A textial rich logger.
181
181
 
182
182
  """
183
- enable_textual_rich_console_and_traceback()
183
+ enable_rich_logging()
184
184
  handler = get_rich_handler()
185
185
  logger = logging.getLogger(name)
186
186
  for handler in logger.handlers:
@@ -339,8 +339,11 @@ class ResourcesCodeGen:
339
339
  str: The formatted resource class.
340
340
 
341
341
  """
342
- # Initialize an empty string for the resource class
343
- resource_class = ""
342
+ resource_class = f"class {resource_name}(Base):\n"
343
+ class_documentation_string = f"Class representing resource {resource_name}\n"
344
+ basic_class_content = resource_class + add_indent(
345
+ f'"""\n{class_documentation_string}\n"""\n', 4
346
+ )
344
347
 
345
348
  # _get_class_attributes will return value only if the resource has get or get_all method
346
349
  if class_attribute_info := self._get_class_attributes(resource_name, class_methods):
@@ -348,11 +351,7 @@ class ResourcesCodeGen:
348
351
  class_attribute_info
349
352
  )
350
353
 
351
- # Start defining the class
352
- resource_class = f"class {resource_name}(Base):\n"
353
-
354
- class_documentation_string = f"Class representing resource {resource_name}\n\n"
355
- class_documentation_string += f"Attributes:\n"
354
+ class_documentation_string += f"\nAttributes:\n"
356
355
  class_documentation_string += self._get_shape_attr_documentation_string(
357
356
  attributes_and_documentation
358
357
  )
@@ -444,9 +443,12 @@ class ResourcesCodeGen:
444
443
  else:
445
444
  # If there's no 'get' or 'list' or 'create' method, generate a class with no attributes
446
445
  resource_attributes = []
447
- resource_class = f"class {resource_name}(Base):\n"
448
- class_documentation_string = f"Class representing resource {resource_name}\n"
449
- resource_class += add_indent(f'"""\n{class_documentation_string}\n"""\n', 4)
446
+ resource_class = basic_class_content
447
+
448
+ # if there are no attributes or methods including addition operations
449
+ # class need not be generated
450
+ if resource_name not in self.resource_methods:
451
+ return ""
450
452
 
451
453
  if resource_name in self.resource_methods:
452
454
  # TODO: use resource_methods for all methods
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sagemaker-core
3
- Version: 1.0.38
3
+ Version: 1.0.62
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
@@ -15,14 +15,14 @@ Classifier: Programming Language :: Python :: 3.12
15
15
  Requires-Python: >=3.8
16
16
  Description-Content-Type: text/x-rst
17
17
  License-File: LICENSE
18
- Requires-Dist: boto3<2.0.0,>=1.35.75
18
+ Requires-Dist: boto3<2.0.0,>=1.35.36
19
19
  Requires-Dist: pydantic<3.0.0,>=2.0.0
20
20
  Requires-Dist: PyYAML<7.0,>=6.0
21
21
  Requires-Dist: jsonschema<5.0.0
22
22
  Requires-Dist: platformdirs<5.0.0,>=4.0.0
23
- Requires-Dist: rich<15.0.0,>=14.0.0
23
+ Requires-Dist: rich<15.0.0,>=13.0.0
24
24
  Requires-Dist: mock<5.0,>4.0
25
- Requires-Dist: importlib-metadata<7.0,>=1.4.0
25
+ Requires-Dist: importlib-metadata<=9.0,>=1.4.0
26
26
  Provides-Extra: codegen
27
27
  Requires-Dist: black<25.0.0,>=24.3.0; extra == "codegen"
28
28
  Requires-Dist: pandas<3.0.0,>=2.0.0; extra == "codegen"
@@ -1,21 +1,21 @@
1
- sagemaker_core/__init__.py,sha256=kM7971seaG8p8wFv2T0kOrFLRBhjOpjAHo3DGCaqRHc,126
1
+ sagemaker_core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  sagemaker_core/_version.py,sha256=4UH5LevZBa3Kl1OiDbkaeIzXUQNSYVFrc-2su2TCco4,86
3
3
  sagemaker_core/helper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
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
- sagemaker_core/main/config_schema.py,sha256=Wxe2gJash1rrxBomGhSYmII1LmJ3E70LIuSWklX4_7g,57588
6
+ sagemaker_core/main/config_schema.py,sha256=1xYzDM0FEBQFmiE3R--Nj0_RMQQF3vxlFQXEHzOpOBM,57665
7
7
  sagemaker_core/main/default_configs_helper.py,sha256=bg_tgczX_bYzNiSlalJ6TWPTgrQYsI0uZguP5TIbPiw,8324
8
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=MC0e1l0Pyr5Nw2FS6wLRdeRxGkF7P8VM54P0XxCNhs0,1428069
11
- sagemaker_core/main/shapes.py,sha256=zmVV-dQqNskxOxOawpnY08U3XhlJf3NUEQAvrvYmSgg,743326
10
+ sagemaker_core/main/resources.py,sha256=CvpxLlz3z_OawsXLhMOgzPNFll-wtE7ArPtDZl7oHVI,1450590
11
+ sagemaker_core/main/shapes.py,sha256=zYSg0Y41FJIYRfWYcuekcAS8qDyr2SA3hWeFmDDQFro,790466
12
12
  sagemaker_core/main/user_agent.py,sha256=BPYDAfDd70ObP-VAjl7aDHALHyGknkpRP21ktVr_LDw,2744
13
- sagemaker_core/main/utils.py,sha256=Ge_KdFKWo-qoIXlXkgLbaJbfXMVdUVHTq6BbDQn48Tw,19201
13
+ sagemaker_core/main/utils.py,sha256=y1aZzztCApczZSqT0U7_H8zLlpqp1vgoUKcp40mTM2o,19157
14
14
  sagemaker_core/main/code_injection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
15
  sagemaker_core/main/code_injection/base.py,sha256=11_Jif0nOzfbLGlXaacKf-wcizzfS64U0OSZGoVffFU,1733
16
16
  sagemaker_core/main/code_injection/codec.py,sha256=2YzJ-iYEzmguVaJVcZeyCR0OpTSR7UOixATrOm4MiBk,8885
17
17
  sagemaker_core/main/code_injection/constants.py,sha256=2ICExGge8vAWx7lSTW0JGh-bH1korkvpOpDu5M63eI4,980
18
- sagemaker_core/main/code_injection/shape_dag.py,sha256=GXfeEMcXLNSiBJax4063m5Hxg5hs0bwyC6-H71pNPy0,706807
18
+ sagemaker_core/main/code_injection/shape_dag.py,sha256=2BJf3_vUDfHyddQljfxLM8rmckznsSPhjwDJHpL9YsQ,749633
19
19
  sagemaker_core/resources/__init__.py,sha256=EAYTFMN-nPjnPjjBbhIUeaL67FLKNPd7qbcbl9VIrws,31
20
20
  sagemaker_core/shapes/__init__.py,sha256=RnbIu9eTxKt-DNsOFJabrWIgrrtS9_SdAozP9JBl_ic,28
21
21
  sagemaker_core/tools/__init__.py,sha256=xX79JImxCVzrWMnjgntLCve2G5I-R4pRar5s20kT9Rs,56
@@ -23,13 +23,13 @@ sagemaker_core/tools/codegen.py,sha256=mKWVi2pWnPxyIoWUEPYjEc9Gw7D9bCOrHqa00yzIZ
23
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=W0MHoAk26t_bRwV4_hUOJwT75Lja4R4-1uq49fPHkKc,86405
26
+ sagemaker_core/tools/resources_codegen.py,sha256=1JiA865AWO5kT-xBgYq0IS0K9xlmLqux2Lau2_auV8U,86414
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.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,,
31
+ sagemaker_core-1.0.62.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
32
+ sagemaker_core-1.0.62.dist-info/METADATA,sha256=ttcyTl2o2fFBKSb2IhQH2aSvRhC61yKFMhBrObCaKwA,4871
33
+ sagemaker_core-1.0.62.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
34
+ sagemaker_core-1.0.62.dist-info/top_level.txt,sha256=R3GAZZ1zC5JxqdE_0x2Lu_WYi2Xfke7VsiP3L5zngfA,15
35
+ sagemaker_core-1.0.62.dist-info/RECORD,,