sagemaker-core 0.1.3__py3-none-any.whl → 1.0.0__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.

Potentially problematic release.


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

Files changed (35) hide show
  1. sagemaker_core/__init__.py +4 -0
  2. sagemaker_core/helper/session_helper.py +769 -0
  3. sagemaker_core/{code_injection → main/code_injection}/codec.py +2 -2
  4. sagemaker_core/{code_injection → main/code_injection}/constants.py +10 -0
  5. sagemaker_core/{code_injection → main/code_injection}/shape_dag.py +48 -0
  6. sagemaker_core/{generated → main}/config_schema.py +47 -0
  7. sagemaker_core/{generated → main}/intelligent_defaults_helper.py +8 -8
  8. sagemaker_core/{generated → main}/resources.py +2716 -1284
  9. sagemaker_core/main/shapes.py +11650 -0
  10. sagemaker_core/main/user_agent.py +77 -0
  11. sagemaker_core/{generated → main}/utils.py +246 -10
  12. sagemaker_core/resources/__init__.py +1 -0
  13. sagemaker_core/shapes/__init__.py +1 -0
  14. sagemaker_core/tools/__init__.py +1 -1
  15. sagemaker_core/tools/codegen.py +1 -2
  16. sagemaker_core/tools/constants.py +3 -8
  17. sagemaker_core/tools/method.py +1 -1
  18. sagemaker_core/tools/resources_codegen.py +30 -28
  19. sagemaker_core/tools/resources_extractor.py +4 -8
  20. sagemaker_core/tools/shapes_codegen.py +16 -10
  21. sagemaker_core/tools/shapes_extractor.py +1 -1
  22. sagemaker_core/tools/templates.py +109 -122
  23. {sagemaker_core-0.1.3.dist-info → sagemaker_core-1.0.0.dist-info}/METADATA +6 -3
  24. sagemaker_core-1.0.0.dist-info/RECORD +34 -0
  25. {sagemaker_core-0.1.3.dist-info → sagemaker_core-1.0.0.dist-info}/WHEEL +1 -1
  26. sagemaker_core/generated/shapes.py +0 -11584
  27. sagemaker_core/util/util.py +0 -81
  28. sagemaker_core-0.1.3.dist-info/RECORD +0 -31
  29. /sagemaker_core/{code_injection → helper}/__init__.py +0 -0
  30. /sagemaker_core/{generated → main}/__init__.py +0 -0
  31. /sagemaker_core/{util → main/code_injection}/__init__.py +0 -0
  32. /sagemaker_core/{code_injection → main/code_injection}/base.py +0 -0
  33. /sagemaker_core/{generated → main}/exceptions.py +0 -0
  34. {sagemaker_core-0.1.3.dist-info → sagemaker_core-1.0.0.dist-info}/LICENSE +0 -0
  35. {sagemaker_core-0.1.3.dist-info → sagemaker_core-1.0.0.dist-info}/top_level.txt +0 -0
@@ -1,81 +0,0 @@
1
- # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License"). You
4
- # may not use this file except in compliance with the License. A copy of
5
- # the License is located at
6
- #
7
- # http://aws.amazon.com/apache2.0/
8
- #
9
- # or in the "license" file accompanying this file. This file is
10
- # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11
- # ANY KIND, either express or implied. See the License for the specific
12
- # language governing permissions and limitations under the License.
13
- """Utility module for common utility methods."""
14
- import re
15
- import subprocess
16
-
17
-
18
- def add_indent(text, num_spaces=4):
19
- """
20
- Add customizable indent spaces to a given text.
21
-
22
- Parameters:
23
- text (str): The text to which the indent spaces will be added.
24
- num_spaces (int): Number of spaces to be added for each level of indentation. Default is 4.
25
-
26
- Returns:
27
- str: The text with added indent spaces.
28
- """
29
- indent = " " * num_spaces
30
- lines = text.split("\n")
31
- indented_text = "\n".join(indent + line for line in lines)
32
- return indented_text.rstrip(" ")
33
-
34
-
35
- def clean_documentaion(documentation):
36
- documentation = re.sub(r"<\/?p>", "", documentation)
37
- documentation = re.sub(r"<\/?code>", "'", documentation)
38
- return documentation
39
-
40
-
41
- def convert_to_snake_case(entity_name):
42
- """
43
- Convert a string to snake_case.
44
-
45
- Args:
46
- entity_name (str): The string to convert.
47
-
48
- Returns:
49
- str: The converted string in snake_case.
50
- """
51
- snake_case = re.sub("(.)([A-Z][a-z]+)", r"\1_\2", entity_name)
52
- return re.sub("([a-z0-9])([A-Z])", r"\1_\2", snake_case).lower()
53
-
54
-
55
- def snake_to_pascal(snake_str):
56
- """
57
- Convert a snake_case string to PascalCase.
58
-
59
- Args:
60
- snake_str (str): The snake_case string to be converted.
61
-
62
- Returns:
63
- str: The PascalCase string.
64
-
65
- """
66
- components = snake_str.split("_")
67
- return "".join(x.title() for x in components[0:])
68
-
69
-
70
- def reformat_file_with_black(filename):
71
- try:
72
- # Run black with specific options using subprocess
73
- subprocess.run(["black", "-l", "100", filename], check=True)
74
- print(f"File '{filename}' reformatted successfully.")
75
- except subprocess.CalledProcessError as e:
76
- print(f"An error occurred while reformatting '{filename}': {e}")
77
-
78
-
79
- def remove_html_tags(text):
80
- clean = re.compile("<.*?>")
81
- return re.sub(clean, "", text)
@@ -1,31 +0,0 @@
1
- sagemaker_core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- sagemaker_core/_version.py,sha256=t-XEKT8_pvKkl5z_UrfcIU256c_NxaI16qGWMuNVpbM,321
3
- sagemaker_core/code_injection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- sagemaker_core/code_injection/base.py,sha256=11_Jif0nOzfbLGlXaacKf-wcizzfS64U0OSZGoVffFU,1733
5
- sagemaker_core/code_injection/codec.py,sha256=LUr5zB14Y6Ri39ynuFhpBucJ-QcLkOlOP28Hs1qtcUk,7648
6
- sagemaker_core/code_injection/constants.py,sha256=yg9QEzwqRJnMeroiDaGVAxpw5p-VhyNF_bnz_noXAvU,765
7
- sagemaker_core/code_injection/shape_dag.py,sha256=HuLAaimuVNrLC948UvkRRIxEqVZNaUnYf4_Yq8PkI0I,643113
8
- sagemaker_core/generated/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
- sagemaker_core/generated/config_schema.py,sha256=mXdyHxIkjq6CEm91Bq__klevyo5Kp29lbQulERZgkdM,53689
10
- sagemaker_core/generated/exceptions.py,sha256=87DUlrmHxaWoiYNlpNY9ixxFMPRk_dIGPsA2e_xdVwQ,5602
11
- sagemaker_core/generated/intelligent_defaults_helper.py,sha256=5a9eqvn6PnXIhAbbQOUiFckzy-7gAmTGBHpSK_IQyHc,8300
12
- sagemaker_core/generated/resources.py,sha256=LpUAlSR59nf3QLYOTccoKAMa3-V5oXSH3U9EQQR5R3Q,1210904
13
- sagemaker_core/generated/shapes.py,sha256=mwHm69SRO-g-EPieCg5FhjYnibHsC6w3J87-51xdq0g,691517
14
- sagemaker_core/generated/utils.py,sha256=jPR6cMvi9yEtsmXKxLNBgCPEo4R2betsGucPDIyum7E,10648
15
- sagemaker_core/tools/__init__.py,sha256=fXSeGJdG2O6w6ggyQeyNHIgVxoApd7O9IGDETChUZGU,51
16
- sagemaker_core/tools/codegen.py,sha256=tdnX1q3MDT5luQcFMckRvt6vvOnUGW2U-DkG30-nHPE,2048
17
- sagemaker_core/tools/constants.py,sha256=YAyomLBWAwhbS639JgaVtdc-ifhnWOxMFW89iiYSNMQ,3070
18
- sagemaker_core/tools/data_extractor.py,sha256=NpP22uCaWgvn9uOHsFEkgtn3h2nOIKDvJTLihN01f1A,1368
19
- sagemaker_core/tools/method.py,sha256=FBthC2oeXf9xrIlz09zmg3qanyAvdgWQ_1ej-qy7oDA,716
20
- sagemaker_core/tools/resources_codegen.py,sha256=1n_4KHi4qb_d-308h2lmKoXW7sKXyq00OKO5pAphlbc,89668
21
- sagemaker_core/tools/resources_extractor.py,sha256=JxKu8LHFPqNzRnNkotmTlZbus7cbSED-4nEB5oJksFM,14569
22
- sagemaker_core/tools/shapes_codegen.py,sha256=nvm283rVS5fM8DsTCUhePyjrrdusAxAPt9_tCK1HyPc,11647
23
- sagemaker_core/tools/shapes_extractor.py,sha256=RuKHp5hEB7Xn19AHJM3X5bPWe5hxwexTYGAkJmD3_3o,11949
24
- sagemaker_core/tools/templates.py,sha256=j5-3iW2PpctgJfqljUqu52xfE4fQ538VNlmokrb2dtQ,24375
25
- sagemaker_core/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
- sagemaker_core/util/util.py,sha256=kT7H9n1WWxSMV8We7aaZ9LcHhu-XdSVDg7iXJBEIy0I,2463
27
- sagemaker_core-0.1.3.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
28
- sagemaker_core-0.1.3.dist-info/METADATA,sha256=1oifdj4G-i2cbze3yPAuSAcEQbwBZCzHcoJgoJlYmQw,1107
29
- sagemaker_core-0.1.3.dist-info/WHEEL,sha256=-oYQCr74JF3a37z2nRlQays_SX2MqOANoqVjBBAP2yE,91
30
- sagemaker_core-0.1.3.dist-info/top_level.txt,sha256=R3GAZZ1zC5JxqdE_0x2Lu_WYi2Xfke7VsiP3L5zngfA,15
31
- sagemaker_core-0.1.3.dist-info/RECORD,,
File without changes
File without changes
File without changes