sagemaker-core 1.0.47__py3-none-any.whl → 2.1.1__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.
Files changed (363) hide show
  1. sagemaker/core/__init__.py +16 -0
  2. sagemaker/core/_studio.py +116 -0
  3. sagemaker/core/_version.py +11 -0
  4. sagemaker/core/accept_types.py +131 -0
  5. sagemaker/core/analytics.py +744 -0
  6. sagemaker/core/apiutils/__init__.py +13 -0
  7. sagemaker/core/apiutils/_base_types.py +228 -0
  8. sagemaker/core/apiutils/_boto_functions.py +130 -0
  9. sagemaker/core/apiutils/_utils.py +34 -0
  10. sagemaker/core/base_deserializers.py +35 -0
  11. sagemaker/core/base_serializers.py +35 -0
  12. sagemaker/core/clarify/__init__.py +2898 -0
  13. sagemaker/core/collection.py +467 -0
  14. sagemaker/core/common_utils.py +2281 -0
  15. sagemaker/core/compute_resource_requirements/__init__.py +18 -0
  16. sagemaker/core/compute_resource_requirements/resource_requirements.py +94 -0
  17. sagemaker/core/config/__init__.py +181 -0
  18. sagemaker/core/config/config.py +238 -0
  19. sagemaker/core/config/config_manager.py +595 -0
  20. sagemaker/core/config/config_schema.py +1220 -0
  21. sagemaker/core/config/config_utils.py +297 -0
  22. {sagemaker_core/main → sagemaker/core}/config_schema.py +410 -4
  23. sagemaker/core/constants.py +73 -0
  24. sagemaker/core/content_types.py +137 -0
  25. sagemaker/core/debugger/__init__.py +39 -0
  26. sagemaker/core/debugger/debugger.py +945 -0
  27. sagemaker/core/debugger/framework_profile.py +292 -0
  28. sagemaker/core/debugger/metrics_config.py +468 -0
  29. sagemaker/core/debugger/profiler.py +42 -0
  30. sagemaker/core/debugger/profiler_config.py +190 -0
  31. sagemaker/core/debugger/profiler_constants.py +40 -0
  32. sagemaker/core/debugger/utils.py +148 -0
  33. sagemaker/core/deprecations.py +254 -0
  34. sagemaker/core/deserializers/__init__.py +10 -0
  35. sagemaker/core/deserializers/base.py +424 -0
  36. sagemaker/core/deserializers/implementations.py +157 -0
  37. sagemaker/core/drift_check_baselines.py +106 -0
  38. sagemaker/core/enums.py +51 -0
  39. sagemaker/core/environment_variables.py +101 -0
  40. sagemaker/core/exceptions.py +108 -0
  41. sagemaker/core/experiments/__init__.py +53 -0
  42. sagemaker/core/experiments/_api_types.py +251 -0
  43. sagemaker/core/experiments/_environment.py +124 -0
  44. sagemaker/core/experiments/_helper.py +294 -0
  45. sagemaker/core/experiments/_metrics.py +333 -0
  46. sagemaker/core/experiments/_run_context.py +58 -0
  47. sagemaker/core/experiments/_utils.py +216 -0
  48. sagemaker/core/experiments/experiment.py +244 -0
  49. sagemaker/core/experiments/run.py +970 -0
  50. sagemaker/core/experiments/trial.py +296 -0
  51. sagemaker/core/experiments/trial_component.py +387 -0
  52. sagemaker/core/explainer/__init__.py +24 -0
  53. sagemaker/core/explainer/clarify_explainer_config.py +298 -0
  54. sagemaker/core/explainer/explainer_config.py +44 -0
  55. sagemaker/core/fw_utils.py +1176 -0
  56. sagemaker/core/git_utils.py +349 -0
  57. sagemaker/core/helper/pipeline_variable.py +82 -0
  58. sagemaker/core/helper/session_helper.py +2965 -0
  59. sagemaker/core/huggingface/__init__.py +29 -0
  60. sagemaker/core/huggingface/llm_utils.py +150 -0
  61. sagemaker/core/huggingface/processing.py +139 -0
  62. sagemaker/core/huggingface/training_compiler/config.py +167 -0
  63. sagemaker/core/hyperparameters.py +172 -0
  64. sagemaker/core/image_retriever/__init__.py +3 -0
  65. sagemaker/core/image_retriever/image_retriever.py +640 -0
  66. sagemaker/core/image_retriever/image_retriever_utils.py +511 -0
  67. sagemaker/core/image_retriever/test.py +7 -0
  68. sagemaker/core/image_uri_config/__init__.py +13 -0
  69. sagemaker/core/image_uri_config/autogluon.json +1335 -0
  70. sagemaker/core/image_uri_config/blazingtext.json +50 -0
  71. sagemaker/core/image_uri_config/chainer.json +104 -0
  72. sagemaker/core/image_uri_config/clarify.json +39 -0
  73. sagemaker/core/image_uri_config/coach-mxnet.json +70 -0
  74. sagemaker/core/image_uri_config/coach-tensorflow.json +186 -0
  75. sagemaker/core/image_uri_config/data-wrangler.json +91 -0
  76. sagemaker/core/image_uri_config/debugger.json +34 -0
  77. sagemaker/core/image_uri_config/detailed-profiler.json +18 -0
  78. sagemaker/core/image_uri_config/djl-deepspeed.json +385 -0
  79. sagemaker/core/image_uri_config/djl-fastertransformer.json +167 -0
  80. sagemaker/core/image_uri_config/djl-lmi.json +136 -0
  81. sagemaker/core/image_uri_config/djl-neuronx.json +258 -0
  82. sagemaker/core/image_uri_config/djl-tensorrtllm.json +262 -0
  83. sagemaker/core/image_uri_config/factorization-machines.json +50 -0
  84. sagemaker/core/image_uri_config/forecasting-deepar.json +50 -0
  85. sagemaker/core/image_uri_config/huggingface-llm-neuronx.json +660 -0
  86. sagemaker/core/image_uri_config/huggingface-llm.json +1158 -0
  87. sagemaker/core/image_uri_config/huggingface-neuron.json +52 -0
  88. sagemaker/core/image_uri_config/huggingface-neuronx.json +510 -0
  89. sagemaker/core/image_uri_config/huggingface-tei-cpu.json +298 -0
  90. sagemaker/core/image_uri_config/huggingface-tei.json +298 -0
  91. sagemaker/core/image_uri_config/huggingface-training-compiler.json +195 -0
  92. sagemaker/core/image_uri_config/huggingface.json +2138 -0
  93. sagemaker/core/image_uri_config/hyperpod-recipes-neuron.json +52 -0
  94. sagemaker/core/image_uri_config/image-classification-neo.json +43 -0
  95. sagemaker/core/image_uri_config/image-classification.json +50 -0
  96. sagemaker/core/image_uri_config/inferentia-mxnet.json +88 -0
  97. sagemaker/core/image_uri_config/inferentia-pytorch.json +127 -0
  98. sagemaker/core/image_uri_config/inferentia-tensorflow.json +88 -0
  99. sagemaker/core/image_uri_config/instance_gpu_info.json +782 -0
  100. sagemaker/core/image_uri_config/ipinsights.json +50 -0
  101. sagemaker/core/image_uri_config/kmeans.json +50 -0
  102. sagemaker/core/image_uri_config/knn.json +50 -0
  103. sagemaker/core/image_uri_config/lda.json +26 -0
  104. sagemaker/core/image_uri_config/linear-learner.json +50 -0
  105. sagemaker/core/image_uri_config/model-monitor.json +42 -0
  106. sagemaker/core/image_uri_config/mxnet.json +1154 -0
  107. sagemaker/core/image_uri_config/neo-mxnet.json +64 -0
  108. sagemaker/core/image_uri_config/neo-pytorch.json +341 -0
  109. sagemaker/core/image_uri_config/neo-tensorflow.json +109 -0
  110. sagemaker/core/image_uri_config/ntm.json +50 -0
  111. sagemaker/core/image_uri_config/object-detection.json +50 -0
  112. sagemaker/core/image_uri_config/object2vec.json +50 -0
  113. sagemaker/core/image_uri_config/pca.json +50 -0
  114. sagemaker/core/image_uri_config/pytorch-neuron.json +43 -0
  115. sagemaker/core/image_uri_config/pytorch-smp.json +218 -0
  116. sagemaker/core/image_uri_config/pytorch-training-compiler.json +80 -0
  117. sagemaker/core/image_uri_config/pytorch.json +3101 -0
  118. sagemaker/core/image_uri_config/randomcutforest.json +50 -0
  119. sagemaker/core/image_uri_config/ray-pytorch.json +46 -0
  120. sagemaker/core/image_uri_config/ray-tensorflow.json +194 -0
  121. sagemaker/core/image_uri_config/sagemaker-base-python.json +46 -0
  122. sagemaker/core/image_uri_config/sagemaker-distribution.json +37 -0
  123. sagemaker/core/image_uri_config/sagemaker-geospatial.json +13 -0
  124. sagemaker/core/image_uri_config/sagemaker-tritonserver.json +212 -0
  125. sagemaker/core/image_uri_config/semantic-segmentation.json +50 -0
  126. sagemaker/core/image_uri_config/seq2seq.json +50 -0
  127. sagemaker/core/image_uri_config/sklearn.json +446 -0
  128. sagemaker/core/image_uri_config/spark.json +280 -0
  129. sagemaker/core/image_uri_config/sparkml-serving.json +97 -0
  130. sagemaker/core/image_uri_config/stabilityai.json +53 -0
  131. sagemaker/core/image_uri_config/tensorflow.json +5086 -0
  132. sagemaker/core/image_uri_config/vw.json +25 -0
  133. sagemaker/core/image_uri_config/xgboost-neo.json +43 -0
  134. sagemaker/core/image_uri_config/xgboost.json +888 -0
  135. sagemaker/core/image_uris.py +810 -0
  136. sagemaker/core/inference_config.py +144 -0
  137. sagemaker/core/inference_recommender/__init__.py +18 -0
  138. sagemaker/core/inference_recommender/inference_recommender_mixin.py +622 -0
  139. sagemaker/core/inputs.py +366 -0
  140. sagemaker/core/instance_group.py +61 -0
  141. sagemaker/core/instance_types.py +164 -0
  142. sagemaker/core/instance_types_gpu_info.py +43 -0
  143. sagemaker/core/interactive_apps/__init__.py +41 -0
  144. sagemaker/core/interactive_apps/base_interactive_app.py +204 -0
  145. sagemaker/core/interactive_apps/detail_profiler_app.py +139 -0
  146. sagemaker/core/interactive_apps/tensorboard.py +149 -0
  147. sagemaker/core/iterators.py +186 -0
  148. sagemaker/core/job.py +380 -0
  149. sagemaker/core/jumpstart/__init__.py +156 -0
  150. sagemaker/core/jumpstart/accessors.py +390 -0
  151. sagemaker/core/jumpstart/artifacts/__init__.py +69 -0
  152. sagemaker/core/jumpstart/artifacts/environment_variables.py +252 -0
  153. sagemaker/core/jumpstart/artifacts/hyperparameters.py +120 -0
  154. sagemaker/core/jumpstart/artifacts/image_uris.py +139 -0
  155. sagemaker/core/jumpstart/artifacts/incremental_training.py +87 -0
  156. sagemaker/core/jumpstart/artifacts/instance_types.py +223 -0
  157. sagemaker/core/jumpstart/artifacts/kwargs.py +289 -0
  158. sagemaker/core/jumpstart/artifacts/metric_definitions.py +117 -0
  159. sagemaker/core/jumpstart/artifacts/model_packages.py +202 -0
  160. sagemaker/core/jumpstart/artifacts/model_uris.py +252 -0
  161. sagemaker/core/jumpstart/artifacts/payloads.py +96 -0
  162. sagemaker/core/jumpstart/artifacts/predictors.py +540 -0
  163. sagemaker/core/jumpstart/artifacts/resource_names.py +86 -0
  164. sagemaker/core/jumpstart/artifacts/resource_requirements.py +162 -0
  165. sagemaker/core/jumpstart/artifacts/script_uris.py +172 -0
  166. sagemaker/core/jumpstart/cache.py +663 -0
  167. sagemaker/core/jumpstart/configs.py +50 -0
  168. sagemaker/core/jumpstart/constants.py +198 -0
  169. sagemaker/core/jumpstart/deserializers.py +81 -0
  170. sagemaker/core/jumpstart/document.py +76 -0
  171. sagemaker/core/jumpstart/enums.py +168 -0
  172. sagemaker/core/jumpstart/exceptions.py +236 -0
  173. sagemaker/core/jumpstart/factory/utils.py +833 -0
  174. sagemaker/core/jumpstart/filters.py +597 -0
  175. sagemaker/core/jumpstart/hub/__init__.py +0 -0
  176. sagemaker/core/jumpstart/hub/constants.py +16 -0
  177. sagemaker/core/jumpstart/hub/hub.py +291 -0
  178. sagemaker/core/jumpstart/hub/interfaces.py +936 -0
  179. sagemaker/core/jumpstart/hub/parser_utils.py +70 -0
  180. sagemaker/core/jumpstart/hub/parsers.py +288 -0
  181. sagemaker/core/jumpstart/hub/types.py +35 -0
  182. sagemaker/core/jumpstart/hub/utils.py +260 -0
  183. sagemaker/core/jumpstart/models.py +499 -0
  184. sagemaker/core/jumpstart/notebook_utils.py +575 -0
  185. sagemaker/core/jumpstart/parameters.py +20 -0
  186. sagemaker/core/jumpstart/payload_utils.py +239 -0
  187. sagemaker/core/jumpstart/region_config.json +163 -0
  188. sagemaker/core/jumpstart/search.py +171 -0
  189. sagemaker/core/jumpstart/serializers.py +81 -0
  190. sagemaker/core/jumpstart/session_utils.py +234 -0
  191. sagemaker/core/jumpstart/types.py +3044 -0
  192. sagemaker/core/jumpstart/utils.py +1731 -0
  193. sagemaker/core/jumpstart/validators.py +257 -0
  194. sagemaker/core/lambda_helper.py +312 -0
  195. sagemaker/core/lineage/__init__.py +42 -0
  196. sagemaker/core/lineage/_api_types.py +239 -0
  197. sagemaker/core/lineage/_utils.py +49 -0
  198. sagemaker/core/lineage/action.py +345 -0
  199. sagemaker/core/lineage/artifact.py +646 -0
  200. sagemaker/core/lineage/association.py +190 -0
  201. sagemaker/core/lineage/context.py +505 -0
  202. sagemaker/core/lineage/lineage_trial_component.py +191 -0
  203. sagemaker/core/lineage/query.py +732 -0
  204. sagemaker/core/lineage/visualizer.py +346 -0
  205. sagemaker/core/local/__init__.py +18 -0
  206. sagemaker/core/local/data.py +413 -0
  207. sagemaker/core/local/entities.py +678 -0
  208. sagemaker/core/local/exceptions.py +17 -0
  209. sagemaker/core/local/image.py +1243 -0
  210. sagemaker/core/local/local_session.py +739 -0
  211. sagemaker/core/local/utils.py +245 -0
  212. sagemaker/core/logs.py +181 -0
  213. sagemaker/core/metadata_properties.py +56 -0
  214. sagemaker/core/metric_definitions.py +91 -0
  215. sagemaker/core/mlflow/__init__.py +38 -0
  216. sagemaker/core/mlflow/forward_sagemaker_metrics.py +44 -0
  217. sagemaker/core/model_card/__init__.py +26 -0
  218. sagemaker/core/model_life_cycle.py +51 -0
  219. sagemaker/core/model_metrics.py +160 -0
  220. sagemaker/core/model_monitor/__init__.py +66 -0
  221. sagemaker/core/model_monitor/clarify_model_monitoring.py +1495 -0
  222. sagemaker/core/model_monitor/cron_expression_generator.py +82 -0
  223. sagemaker/core/model_monitor/data_capture_config.py +115 -0
  224. sagemaker/core/model_monitor/data_quality_monitoring_config.py +66 -0
  225. sagemaker/core/model_monitor/dataset_format.py +102 -0
  226. sagemaker/core/model_monitor/model_monitoring.py +4266 -0
  227. sagemaker/core/model_monitor/monitoring_alert.py +76 -0
  228. sagemaker/core/model_monitor/monitoring_files.py +506 -0
  229. sagemaker/core/model_monitor/utils.py +793 -0
  230. sagemaker/core/model_registry.py +480 -0
  231. sagemaker/core/model_uris.py +97 -0
  232. sagemaker/core/modules/__init__.py +19 -0
  233. sagemaker/core/modules/configs.py +226 -0
  234. sagemaker/core/modules/constants.py +37 -0
  235. sagemaker/core/modules/distributed.py +182 -0
  236. sagemaker/core/modules/local_core/__init__.py +0 -0
  237. sagemaker/core/modules/local_core/local_container.py +605 -0
  238. sagemaker/core/modules/templates.py +83 -0
  239. sagemaker/core/modules/train/__init__.py +14 -0
  240. sagemaker/core/modules/train/container_drivers/__init__.py +14 -0
  241. sagemaker/core/modules/train/container_drivers/common/__init__.py +14 -0
  242. sagemaker/core/modules/train/container_drivers/common/utils.py +213 -0
  243. sagemaker/core/modules/train/container_drivers/distributed_drivers/__init__.py +14 -0
  244. sagemaker/core/modules/train/container_drivers/distributed_drivers/basic_script_driver.py +81 -0
  245. sagemaker/core/modules/train/container_drivers/distributed_drivers/mpi_driver.py +123 -0
  246. sagemaker/core/modules/train/container_drivers/distributed_drivers/mpi_utils.py +302 -0
  247. sagemaker/core/modules/train/container_drivers/distributed_drivers/torchrun_driver.py +129 -0
  248. sagemaker/core/modules/train/container_drivers/scripts/__init__.py +14 -0
  249. sagemaker/core/modules/train/container_drivers/scripts/environment.py +305 -0
  250. sagemaker/core/modules/train/sm_recipes/__init__.py +0 -0
  251. sagemaker/core/modules/train/sm_recipes/utils.py +330 -0
  252. sagemaker/core/modules/types.py +19 -0
  253. sagemaker/core/modules/utils.py +194 -0
  254. sagemaker/core/network.py +185 -0
  255. sagemaker/core/parameter.py +173 -0
  256. sagemaker/core/payloads.py +185 -0
  257. sagemaker/core/processing.py +1597 -0
  258. sagemaker/core/remote_function/__init__.py +19 -0
  259. sagemaker/core/remote_function/checkpoint_location.py +47 -0
  260. sagemaker/core/remote_function/client.py +1285 -0
  261. sagemaker/core/remote_function/core/__init__.py +0 -0
  262. sagemaker/core/remote_function/core/_custom_dispatch_table.py +72 -0
  263. sagemaker/core/remote_function/core/pipeline_variables.py +353 -0
  264. sagemaker/core/remote_function/core/serialization.py +422 -0
  265. sagemaker/core/remote_function/core/stored_function.py +226 -0
  266. sagemaker/core/remote_function/custom_file_filter.py +128 -0
  267. sagemaker/core/remote_function/errors.py +104 -0
  268. sagemaker/core/remote_function/invoke_function.py +172 -0
  269. sagemaker/core/remote_function/job.py +2140 -0
  270. sagemaker/core/remote_function/logging_config.py +38 -0
  271. sagemaker/core/remote_function/runtime_environment/__init__.py +14 -0
  272. sagemaker/core/remote_function/runtime_environment/bootstrap_runtime_environment.py +605 -0
  273. sagemaker/core/remote_function/runtime_environment/mpi_utils_remote.py +252 -0
  274. sagemaker/core/remote_function/runtime_environment/runtime_environment_manager.py +554 -0
  275. sagemaker/core/remote_function/runtime_environment/spark_app.py +18 -0
  276. sagemaker/core/remote_function/spark_config.py +149 -0
  277. sagemaker/core/resource_requirements.py +168 -0
  278. {sagemaker_core/main → sagemaker/core}/resources.py +20121 -11728
  279. sagemaker/core/s3/__init__.py +41 -0
  280. sagemaker/core/s3/client.py +367 -0
  281. sagemaker/core/s3/utils.py +175 -0
  282. sagemaker/core/script_uris.py +93 -0
  283. sagemaker/core/serializers/__init__.py +11 -0
  284. sagemaker/core/serializers/base.py +510 -0
  285. sagemaker/core/serializers/implementations.py +159 -0
  286. sagemaker/core/serializers/utils.py +223 -0
  287. sagemaker/core/serverless_inference_config.py +63 -0
  288. sagemaker/core/session_settings.py +55 -0
  289. sagemaker/core/shapes/__init__.py +3 -0
  290. sagemaker/core/shapes/model_card_shapes.py +159 -0
  291. {sagemaker_core/main → sagemaker/core/shapes}/shapes.py +6384 -1865
  292. sagemaker/core/spark/__init__.py +16 -0
  293. sagemaker/core/spark/defaults.py +16 -0
  294. sagemaker/core/spark/processing.py +1380 -0
  295. sagemaker/core/telemetry/__init__.py +23 -0
  296. sagemaker/core/telemetry/constants.py +84 -0
  297. sagemaker/core/telemetry/telemetry_logging.py +284 -0
  298. sagemaker/core/tools/__init__.py +1 -0
  299. {sagemaker_core → sagemaker/core}/tools/codegen.py +4 -4
  300. {sagemaker_core → sagemaker/core}/tools/constants.py +23 -15
  301. {sagemaker_core → sagemaker/core}/tools/data_extractor.py +1 -1
  302. {sagemaker_core → sagemaker/core}/tools/method.py +1 -1
  303. sagemaker/core/tools/model_card/generate_model_card_from_schema.py +562 -0
  304. {sagemaker_core → sagemaker/core}/tools/resources_codegen.py +165 -98
  305. {sagemaker_core → sagemaker/core}/tools/resources_extractor.py +5 -13
  306. {sagemaker_core → sagemaker/core}/tools/shapes_codegen.py +16 -17
  307. {sagemaker_core → sagemaker/core}/tools/shapes_extractor.py +29 -67
  308. {sagemaker_core → sagemaker/core}/tools/templates.py +39 -17
  309. sagemaker/core/training/__init__.py +14 -0
  310. sagemaker/core/training/configs.py +333 -0
  311. sagemaker/core/training/constants.py +37 -0
  312. sagemaker/core/training/utils.py +77 -0
  313. sagemaker/core/training_compiler/__init__.py +16 -0
  314. sagemaker/core/training_compiler/config.py +197 -0
  315. sagemaker/core/training_compiler_config.py +197 -0
  316. sagemaker/core/transformer.py +793 -0
  317. sagemaker/core/user_agent.py +76 -0
  318. sagemaker/core/utilities/__init__.py +24 -0
  319. sagemaker/core/utilities/cache.py +169 -0
  320. sagemaker/core/utilities/search_expression.py +133 -0
  321. sagemaker/core/utils/__init__.py +48 -0
  322. sagemaker/core/utils/code_injection/__init__.py +0 -0
  323. {sagemaker_core/main → sagemaker/core/utils}/code_injection/codec.py +2 -2
  324. {sagemaker_core/main → sagemaker/core/utils}/code_injection/shape_dag.py +6479 -136
  325. {sagemaker_core/main → sagemaker/core/utils}/exceptions.py +8 -8
  326. sagemaker_core/main/default_configs_helper.py → sagemaker/core/utils/intelligent_defaults_helper.py +5 -6
  327. {sagemaker_core/main → sagemaker/core/utils}/logs.py +1 -2
  328. {sagemaker_core/main → sagemaker/core/utils}/utils.py +25 -20
  329. sagemaker/core/workflow/__init__.py +152 -0
  330. sagemaker/core/workflow/conditions.py +313 -0
  331. sagemaker/core/workflow/entities.py +58 -0
  332. sagemaker/core/workflow/execution_variables.py +89 -0
  333. sagemaker/core/workflow/functions.py +193 -0
  334. sagemaker/core/workflow/parameters.py +222 -0
  335. sagemaker/core/workflow/pipeline_context.py +394 -0
  336. sagemaker/core/workflow/pipeline_definition_config.py +31 -0
  337. sagemaker/core/workflow/properties.py +285 -0
  338. sagemaker/core/workflow/step_outputs.py +65 -0
  339. sagemaker/core/workflow/utilities.py +507 -0
  340. sagemaker/lineage/__init__.py +33 -0
  341. sagemaker/lineage/action.py +28 -0
  342. sagemaker/lineage/artifact.py +28 -0
  343. sagemaker/lineage/context.py +28 -0
  344. sagemaker/lineage/lineage_trial_component.py +28 -0
  345. {sagemaker_core-1.0.47.dist-info → sagemaker_core-2.1.1.dist-info}/METADATA +28 -9
  346. sagemaker_core-2.1.1.dist-info/RECORD +355 -0
  347. sagemaker_core-2.1.1.dist-info/top_level.txt +1 -0
  348. sagemaker_core/__init__.py +0 -4
  349. sagemaker_core/_version.py +0 -3
  350. sagemaker_core/helper/session_helper.py +0 -769
  351. sagemaker_core/resources/__init__.py +0 -1
  352. sagemaker_core/shapes/__init__.py +0 -1
  353. sagemaker_core/tools/__init__.py +0 -1
  354. sagemaker_core-1.0.47.dist-info/RECORD +0 -35
  355. sagemaker_core-1.0.47.dist-info/top_level.txt +0 -1
  356. {sagemaker_core → sagemaker/core}/helper/__init__.py +0 -0
  357. {sagemaker_core/main → sagemaker/core/huggingface/training_compiler}/__init__.py +0 -0
  358. {sagemaker_core/main/code_injection → sagemaker/core/jumpstart/factory}/__init__.py +0 -0
  359. {sagemaker_core/main → sagemaker/core/utils}/code_injection/base.py +0 -0
  360. {sagemaker_core/main → sagemaker/core/utils}/code_injection/constants.py +0 -0
  361. {sagemaker_core/main → sagemaker/core/utils}/user_agent.py +0 -0
  362. {sagemaker_core-1.0.47.dist-info → sagemaker_core-2.1.1.dist-info}/WHEEL +0 -0
  363. {sagemaker_core-1.0.47.dist-info → sagemaker_core-2.1.1.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,507 @@
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
+ """Utilities to support workflow."""
14
+ from __future__ import absolute_import
15
+
16
+ import inspect
17
+ import logging
18
+ from functools import wraps
19
+ from pathlib import Path
20
+ from typing import List, Sequence, Union, Set, TYPE_CHECKING, Optional
21
+ import hashlib
22
+ from urllib.parse import unquote, urlparse
23
+ from contextlib import contextmanager
24
+ from _hashlib import HASH as Hash
25
+
26
+ from sagemaker.core.common_utils import base_from_name
27
+ from sagemaker.core.workflow.parameters import Parameter
28
+ from sagemaker.core.workflow.pipeline_context import _StepArguments, _PipelineConfig
29
+ from sagemaker.core.workflow.entities import Entity
30
+ from sagemaker.core.helper.pipeline_variable import RequestType
31
+ from sagemaker.core.workflow.pipeline_definition_config import PipelineDefinitionConfig
32
+
33
+ logger = logging.getLogger(__name__)
34
+
35
+ DEF_CONFIG_WARN_MSG_TEMPLATE = (
36
+ "Popping out '%s' from the pipeline definition by default "
37
+ "since it will be overridden at pipeline execution time. Please utilize "
38
+ "the PipelineDefinitionConfig to persist this field in the pipeline definition "
39
+ "if desired."
40
+ )
41
+
42
+ JOB_KEY_NONE_WARN_MSG_TEMPLATE = (
43
+ "Invalid input: use_custom_job_prefix flag is set but the name field [{}] has not been "
44
+ "specified. Please refer to the AWS Docs to identify which field should be set to enable the "
45
+ "custom-prefixing feature for jobs created via a pipeline execution. "
46
+ "https://docs.aws.amazon.com/sagemaker/latest/dg/"
47
+ "build-and-manage-access.html#build-and-manage-step-permissions-prefix"
48
+ )
49
+
50
+ if TYPE_CHECKING:
51
+ from sagemaker.mlops.workflow.step_collections import StepCollection
52
+
53
+ BUF_SIZE = 65536 # 64KiB
54
+ _pipeline_config: _PipelineConfig = None
55
+
56
+
57
+ def list_to_request(entities: Sequence[Union[Entity, "StepCollection"]]) -> List[RequestType]:
58
+ """Get the request structure for list of entities.
59
+
60
+ Args:
61
+ entities (Sequence[Entity]): A list of entities.
62
+ Returns:
63
+ list: A request structure for a workflow service call.
64
+ """
65
+ from sagemaker.mlops.workflow.step_collections import StepCollection
66
+
67
+ request_dicts = []
68
+ for entity in entities:
69
+ if isinstance(entity, Entity):
70
+ request_dicts.append(entity.to_request())
71
+ elif isinstance(entity, StepCollection):
72
+ request_dicts.extend(entity.request_dicts())
73
+ return request_dicts
74
+
75
+
76
+ @contextmanager
77
+ def step_compilation_context_manager(
78
+ pipeline_name: str,
79
+ step_name: str,
80
+ sagemaker_session,
81
+ code_hash: str,
82
+ config_hash: str,
83
+ pipeline_definition_config: PipelineDefinitionConfig,
84
+ upload_runtime_scripts: bool,
85
+ upload_workspace: bool,
86
+ pipeline_build_time: str,
87
+ function_step_secret_token: Optional[str] = None,
88
+ ):
89
+ """Expose static _pipeline_config variable to other modules
90
+
91
+ Args:
92
+ pipeline_name (str): pipeline name
93
+ step_name (str): step name
94
+ sagemaker_session (sagemaker.core.helper.session.Session): a sagemaker session
95
+ code_hash (str): a hash of the code artifact for the particular step
96
+ config_hash (str): a hash of the config artifact for the particular step (Processing)
97
+ pipeline_definition_config (PipelineDefinitionConfig): a configuration used to toggle
98
+ feature flags persistent in a pipeline definition
99
+ upload_runtime_scripts (bool): flag used to manage upload of runtime scripts to s3 for
100
+ a _FunctionStep in pipeline
101
+ upload_workspace (bool): flag used to manage the upload of workspace to s3 for a
102
+ _FunctionStep in pipeline
103
+ pipeline_build_time (str): timestamp when the pipeline is being built
104
+ function_step_secret_token (str): secret token used for the function step checksum
105
+ """
106
+
107
+ # pylint: disable=W0603
108
+ global _pipeline_config
109
+ _pipeline_config = _PipelineConfig(
110
+ pipeline_name=pipeline_name,
111
+ step_name=step_name,
112
+ sagemaker_session=sagemaker_session,
113
+ code_hash=code_hash,
114
+ config_hash=config_hash,
115
+ pipeline_definition_config=pipeline_definition_config,
116
+ upload_runtime_scripts=upload_runtime_scripts,
117
+ upload_workspace=upload_workspace,
118
+ pipeline_build_time=pipeline_build_time,
119
+ function_step_secret_token=function_step_secret_token,
120
+ )
121
+ try:
122
+ yield _pipeline_config
123
+ finally:
124
+ _pipeline_config = None
125
+
126
+
127
+ def load_step_compilation_context():
128
+ """Load the step compilation context from the static _pipeline_config variable
129
+
130
+ Returns:
131
+ _PipelineConfig: a context object containing information about the current step
132
+ """
133
+ return _pipeline_config
134
+
135
+
136
+ def get_code_hash(step: Entity) -> str:
137
+ """Get the hash of the code artifact(s) for the given step
138
+
139
+ Args:
140
+ step (Entity): A pipeline step object (Entity type because Step causes circular import)
141
+ Returns:
142
+ str: A hash string representing the unique code artifact(s) for the step
143
+ """
144
+ from sagemaker.mlops.workflow.steps import ProcessingStep, TrainingStep
145
+
146
+ if isinstance(step, ProcessingStep) and step.step_args:
147
+ kwargs = step.step_args.func_kwargs
148
+ source_dir = kwargs.get("source_dir")
149
+ submit_class = kwargs.get("submit_class")
150
+ dependencies = get_processing_dependencies(
151
+ [
152
+ kwargs.get("dependencies"),
153
+ kwargs.get("submit_py_files"),
154
+ [submit_class] if submit_class else None,
155
+ kwargs.get("submit_jars"),
156
+ kwargs.get("submit_files"),
157
+ ]
158
+ )
159
+ code = kwargs.get("submit_app") or kwargs.get("code")
160
+
161
+ return get_processing_code_hash(code, source_dir, dependencies)
162
+
163
+ if isinstance(step, TrainingStep) and step.step_args:
164
+ model_trainer = step.step_args.func_args[0]
165
+ source_code = model_trainer.source_code
166
+ if source_code:
167
+ source_dir = source_code.source_dir
168
+ dependencies = source_code.dependencies
169
+ entry_point = source_code.entry_script
170
+ return get_training_code_hash(entry_point, source_dir, dependencies)
171
+ return None
172
+
173
+
174
+ def get_processing_dependencies(dependency_args: List[List[str]]) -> List[str]:
175
+ """Get the Processing job dependencies from the processor run kwargs
176
+
177
+ Args:
178
+ dependency_args: A list of dependency args from processor.run()
179
+ Returns:
180
+ List[str]: A list of code dependencies for the job
181
+ """
182
+
183
+ dependencies = []
184
+ for arg in dependency_args:
185
+ if arg:
186
+ dependencies += arg
187
+
188
+ return dependencies
189
+
190
+
191
+ def get_processing_code_hash(code: str, source_dir: str, dependencies: List[str]) -> str:
192
+ """Get the hash of a processing step's code artifact(s).
193
+
194
+ Args:
195
+ code (str): Path to a file with the processing script to run
196
+ source_dir (str): Path to a directory with any other processing
197
+ source code dependencies aside from the entry point file
198
+ dependencies (str): A list of paths to directories (absolute
199
+ or relative) with any additional libraries that will be exported
200
+ to the container
201
+ Returns:
202
+ str: A hash string representing the unique code artifact(s) for the step
203
+ """
204
+
205
+ # FrameworkProcessor
206
+ if source_dir:
207
+ source_dir_url = urlparse(source_dir)
208
+ if source_dir_url.scheme == "" or source_dir_url.scheme == "file":
209
+ # Include code in the hash when possible
210
+ if code:
211
+ code_url = urlparse(code)
212
+ if code_url.scheme == "" or code_url.scheme == "file":
213
+ return hash_files_or_dirs([code, source_dir] + dependencies)
214
+ return hash_files_or_dirs([source_dir] + dependencies)
215
+ # Other Processors - Spark, Script, Base, etc.
216
+ if code:
217
+ code_url = urlparse(code)
218
+ if code_url.scheme == "" or code_url.scheme == "file":
219
+ return hash_files_or_dirs([code] + dependencies)
220
+ return None
221
+
222
+
223
+ def get_training_code_hash(entry_point: str, source_dir: str, dependencies: List[str]) -> str:
224
+ """Get the hash of a training step's code artifact(s).
225
+
226
+ Args:
227
+ entry_point (str): The absolute or relative path to the local Python
228
+ source file that should be executed as the entry point to
229
+ training
230
+ source_dir (str): Path to a directory with any other training source
231
+ code dependencies aside from the entry point file
232
+ dependencies (str): A list of paths to directories (absolute
233
+ or relative) with any additional libraries that will be exported
234
+ to the container
235
+ Returns:
236
+ str: A hash string representing the unique code artifact(s) for the step
237
+ """
238
+ from sagemaker.core.workflow import is_pipeline_variable
239
+
240
+ if not is_pipeline_variable(source_dir) and not is_pipeline_variable(entry_point):
241
+ if source_dir:
242
+ source_dir_url = urlparse(source_dir)
243
+ if source_dir_url.scheme == "" or source_dir_url.scheme == "file":
244
+ return hash_files_or_dirs([source_dir] + dependencies)
245
+ elif entry_point:
246
+ entry_point_url = urlparse(entry_point)
247
+ if entry_point_url.scheme == "" or entry_point_url.scheme == "file":
248
+ return hash_files_or_dirs([entry_point] + dependencies)
249
+ return None
250
+
251
+
252
+ def get_config_hash(step: Entity):
253
+ """Get the hash of the config artifact(s) for the given step
254
+
255
+ Args:
256
+ step (Entity): A pipeline step object (Entity type because Step causes circular import)
257
+ Returns:
258
+ str: A hash string representing the unique config artifact(s) for the step
259
+ """
260
+ from sagemaker.mlops.workflow.steps import ProcessingStep
261
+
262
+ if isinstance(step, ProcessingStep) and step.step_args:
263
+ config = step.step_args.func_kwargs.get("configuration")
264
+ if config:
265
+ return hash_object(config)
266
+ return None
267
+
268
+
269
+ def hash_object(obj) -> str:
270
+ """Get the SHA256 hash of an object.
271
+
272
+ Args:
273
+ obj (dict): The object
274
+ Returns:
275
+ str: The SHA256 hash of the object
276
+ """
277
+ return hashlib.sha256(str(obj).encode()).hexdigest()
278
+
279
+
280
+ def hash_file(path: str) -> str:
281
+ """Get the SHA256 hash of a file.
282
+
283
+ Args:
284
+ path (str): The local path for the file.
285
+ Returns:
286
+ str: The SHA256 hash of the file.
287
+ """
288
+ return _hash_file(path, hashlib.sha256()).hexdigest()
289
+
290
+
291
+ def hash_files_or_dirs(paths: List[str]) -> str:
292
+ """Get the SHA256 hash of the contents of a list of files or directories.
293
+
294
+ Hash is changed if:
295
+ * input list is changed
296
+ * new nested directories/files are added to any directory in the input list
297
+ * nested directory/file names are changed for any of the inputted directories
298
+ * content of files is edited
299
+
300
+ Args:
301
+ paths: List of file or directory paths
302
+ Returns:
303
+ str: The SHA256 hash of the list of files or directories.
304
+ """
305
+ sha256 = hashlib.sha256()
306
+ for path in sorted(paths):
307
+ sha256 = _hash_file_or_dir(path, sha256)
308
+ return sha256.hexdigest()
309
+
310
+
311
+ def _hash_file_or_dir(path: str, sha256: Hash) -> Hash:
312
+ """Updates the inputted Hash with the contents of the current path.
313
+
314
+ Args:
315
+ path: path of file or directory
316
+ Returns:
317
+ str: The SHA256 hash of the file or directory
318
+ """
319
+ if isinstance(path, str) and path.lower().startswith("file://"):
320
+ path = unquote(urlparse(path).path)
321
+ sha256.update(path.encode())
322
+ if Path(path).is_dir():
323
+ sha256 = _hash_dir(path, sha256)
324
+ elif Path(path).is_file():
325
+ sha256 = _hash_file(path, sha256)
326
+ return sha256
327
+
328
+
329
+ def _hash_dir(directory: Union[str, Path], sha256: Hash) -> Hash:
330
+ """Updates the inputted Hash with the contents of the current path.
331
+
332
+ Args:
333
+ directory: path of the directory
334
+ Returns:
335
+ str: The SHA256 hash of the directory
336
+ """
337
+ if not Path(directory).is_dir():
338
+ raise ValueError(str(directory) + " is not a valid directory")
339
+ for path in sorted(Path(directory).iterdir()):
340
+ sha256.update(path.name.encode())
341
+ if path.is_file():
342
+ sha256 = _hash_file(path, sha256)
343
+ elif path.is_dir():
344
+ sha256 = _hash_dir(path, sha256)
345
+ return sha256
346
+
347
+
348
+ def _hash_file(file: Union[str, Path], sha256: Hash) -> Hash:
349
+ """Updates the inputted Hash with the contents of the current path.
350
+
351
+ Args:
352
+ file: path of the file
353
+ Returns:
354
+ str: The SHA256 hash of the file
355
+ """
356
+ if isinstance(file, str) and file.lower().startswith("file://"):
357
+ file = unquote(urlparse(file).path)
358
+ if not Path(file).is_file():
359
+ raise ValueError(str(file) + " is not a valid file")
360
+ with open(file, "rb") as f:
361
+ while True:
362
+ data = f.read(BUF_SIZE)
363
+ if not data:
364
+ break
365
+ sha256.update(data)
366
+ return sha256
367
+
368
+
369
+ def validate_step_args_input(
370
+ step_args: _StepArguments, expected_caller: Set[str], error_message: str
371
+ ):
372
+ """Validate the `_StepArguments` object which is passed into a pipeline step
373
+
374
+ Args:
375
+ step_args (_StepArguments): A `_StepArguments` object to be used for composing
376
+ a pipeline step.
377
+ expected_caller (Set[str]): The expected name of the caller function which is
378
+ intercepted by the PipelineSession to get the step arguments.
379
+ error_message (str): The error message to be thrown if the validation fails.
380
+ """
381
+ if not isinstance(step_args, _StepArguments):
382
+ raise TypeError(error_message)
383
+ if step_args.caller_name not in expected_caller:
384
+ raise ValueError(error_message)
385
+
386
+
387
+ def override_pipeline_parameter_var(func):
388
+ """A decorator to override pipeline Parameters passed into a function
389
+
390
+ This is a temporary decorator to override pipeline Parameter objects with their default value
391
+ and display warning information to instruct users to update their code.
392
+
393
+ This decorator can help to give a grace period for users to update their code when
394
+ we make changes to explicitly prevent passing any pipeline variables to a function.
395
+
396
+ We should remove this decorator after the grace period.
397
+ """
398
+ warning_msg_template = (
399
+ "The input argument %s of function (%s) is a pipeline variable (%s), "
400
+ "which is interpreted in pipeline execution time only. "
401
+ "As the function needs to evaluate the argument value in SDK compile time, "
402
+ "the default_value of this Parameter object will be used to override it. "
403
+ "Please make sure the default_value is valid."
404
+ )
405
+
406
+ @wraps(func)
407
+ def wrapper(*args, **kwargs):
408
+ func_name = "{}.{}".format(func.__module__, func.__name__)
409
+ params = inspect.signature(func).parameters
410
+ args = list(args)
411
+ for i, (arg_name, _) in enumerate(params.items()):
412
+ if i >= len(args):
413
+ break
414
+ if isinstance(args[i], Parameter):
415
+ logger.warning(warning_msg_template, arg_name, func_name, type(args[i]))
416
+ args[i] = args[i].default_value
417
+ args = tuple(args)
418
+
419
+ for arg_name, value in kwargs.items():
420
+ if isinstance(value, Parameter):
421
+ logger.warning(warning_msg_template, arg_name, func_name, type(value))
422
+ kwargs[arg_name] = value.default_value
423
+ return func(*args, **kwargs)
424
+
425
+ return wrapper
426
+
427
+
428
+ def execute_job_functions(step_args: _StepArguments):
429
+ """Execute the job class functions during pipeline definition construction
430
+
431
+ Executes the job functions such as run(), fit(), or transform() that have been
432
+ delayed until the pipeline gets built, for steps built with a PipelineSession.
433
+
434
+ Handles multiple functions in instances where job functions are chained
435
+ together from the inheritance of different job classes (e.g. PySparkProcessor,
436
+ ScriptProcessor, and Processor).
437
+
438
+ Args:
439
+ step_args (_StepArguments): A `_StepArguments` object to be used for composing
440
+ a pipeline step, contains the necessary function information
441
+ """
442
+
443
+ chained_args = step_args.func(*step_args.func_args, **step_args.func_kwargs)
444
+ if isinstance(chained_args, _StepArguments):
445
+ execute_job_functions(chained_args)
446
+
447
+
448
+ def trim_request_dict(request_dict, job_key, config):
449
+ """Trim request_dict for unwanted fields to not persist them in step arguments
450
+
451
+ Trim the job_name field off request_dict in cases where we do not want to include it
452
+ in the pipeline definition.
453
+
454
+ Args:
455
+ request_dict (dict): A dictionary used to build the arguments for a pipeline step,
456
+ containing fields that will be passed to job client during orchestration.
457
+ job_key (str): The key in a step's arguments to look up the base_job_name if it
458
+ exists
459
+ config (_pipeline_config) The config intercepted and set for a pipeline via the
460
+ context manager
461
+ """
462
+
463
+ if not config or not config.pipeline_definition_config.use_custom_job_prefix:
464
+ logger.warning(DEF_CONFIG_WARN_MSG_TEMPLATE, job_key)
465
+ request_dict.pop(job_key, None) # safely return null in case of KeyError
466
+ else:
467
+ if job_key in request_dict:
468
+ if request_dict[job_key] is None or len(request_dict[job_key]) == 0:
469
+ raise ValueError(JOB_KEY_NONE_WARN_MSG_TEMPLATE.format(job_key))
470
+ request_dict[job_key] = base_from_name(request_dict[job_key]) # trim timestamp
471
+
472
+ return request_dict
473
+
474
+
475
+ def _collect_parameters(func):
476
+ """The decorator function is to collect all the params passed into an invoked function of class.
477
+
478
+ These parameters are set as properties of the class instance. The use case is to simplify
479
+ parameter collecting when they are passed into the step __init__ method.
480
+
481
+ Usage:
482
+ class A:
483
+ @collect_parameters
484
+ def __init__(a, b='', c=None)
485
+ pass
486
+
487
+ In above case, the A instance would have a, b, c set as instance properties.
488
+ None value will be set as well. If the property exists, it will be overridden.
489
+ """
490
+
491
+ @wraps(func)
492
+ def wrapper(self, *args, **kwargs):
493
+ # Get the parameters and values
494
+ signature = inspect.signature(func)
495
+ bound_args = signature.bind(self, *args, **kwargs)
496
+ bound_args.apply_defaults()
497
+
498
+ # Create a dictionary of parameters and their values
499
+ parameters_and_values = dict(bound_args.arguments)
500
+
501
+ for param, value in parameters_and_values.items():
502
+ if param not in ("self", "depends_on"):
503
+ setattr(self, param, value)
504
+
505
+ func(self, *args, **kwargs)
506
+
507
+ return wrapper
@@ -0,0 +1,33 @@
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
+ """Legacy lineage module - compatibility shim.
14
+
15
+ This module provides backward compatibility for code using the old
16
+ `sagemaker.lineage` import path. All functionality has been moved to
17
+ `sagemaker.core.lineage`.
18
+
19
+ DEPRECATED: This module is deprecated. Use `sagemaker.core.lineage` instead.
20
+ """
21
+ from __future__ import absolute_import
22
+
23
+ import warnings
24
+
25
+ # Show deprecation warning
26
+ warnings.warn(
27
+ "The 'sagemaker.lineage' module is deprecated. " "Please use 'sagemaker.core.lineage' instead.",
28
+ DeprecationWarning,
29
+ stacklevel=2,
30
+ )
31
+
32
+ # Re-export from core.lineage for backward compatibility
33
+ from sagemaker.core.lineage import * # noqa: F401, F403
@@ -0,0 +1,28 @@
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
+ """Legacy lineage.action module - compatibility shim.
14
+
15
+ DEPRECATED: Use `sagemaker.core.lineage.action` instead.
16
+ """
17
+ from __future__ import absolute_import
18
+
19
+ import warnings
20
+
21
+ warnings.warn(
22
+ "The 'sagemaker.lineage.action' module is deprecated. "
23
+ "Please use 'sagemaker.core.lineage.action' instead.",
24
+ DeprecationWarning,
25
+ stacklevel=2,
26
+ )
27
+
28
+ from sagemaker.core.lineage.action import * # noqa: F401, F403
@@ -0,0 +1,28 @@
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
+ """Legacy lineage.artifact module - compatibility shim.
14
+
15
+ DEPRECATED: Use `sagemaker.core.lineage.artifact` instead.
16
+ """
17
+ from __future__ import absolute_import
18
+
19
+ import warnings
20
+
21
+ warnings.warn(
22
+ "The 'sagemaker.lineage.artifact' module is deprecated. "
23
+ "Please use 'sagemaker.core.lineage.artifact' instead.",
24
+ DeprecationWarning,
25
+ stacklevel=2,
26
+ )
27
+
28
+ from sagemaker.core.lineage.artifact import * # noqa: F401, F403
@@ -0,0 +1,28 @@
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
+ """Legacy lineage.context module - compatibility shim.
14
+
15
+ DEPRECATED: Use `sagemaker.core.lineage.context` instead.
16
+ """
17
+ from __future__ import absolute_import
18
+
19
+ import warnings
20
+
21
+ warnings.warn(
22
+ "The 'sagemaker.lineage.context' module is deprecated. "
23
+ "Please use 'sagemaker.core.lineage.context' instead.",
24
+ DeprecationWarning,
25
+ stacklevel=2,
26
+ )
27
+
28
+ from sagemaker.core.lineage.context import * # noqa: F401, F403
@@ -0,0 +1,28 @@
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
+ """Legacy lineage.lineage_trial_component module - compatibility shim.
14
+
15
+ DEPRECATED: Use `sagemaker.core.lineage.lineage_trial_component` instead.
16
+ """
17
+ from __future__ import absolute_import
18
+
19
+ import warnings
20
+
21
+ warnings.warn(
22
+ "The 'sagemaker.lineage.lineage_trial_component' module is deprecated. "
23
+ "Please use 'sagemaker.core.lineage.lineage_trial_component' instead.",
24
+ DeprecationWarning,
25
+ stacklevel=2,
26
+ )
27
+
28
+ from sagemaker.core.lineage.lineage_trial_component import * # noqa: F401, F403