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.
- sagemaker/core/__init__.py +16 -0
- sagemaker/core/_studio.py +116 -0
- sagemaker/core/_version.py +11 -0
- sagemaker/core/accept_types.py +131 -0
- sagemaker/core/analytics.py +744 -0
- sagemaker/core/apiutils/__init__.py +13 -0
- sagemaker/core/apiutils/_base_types.py +228 -0
- sagemaker/core/apiutils/_boto_functions.py +130 -0
- sagemaker/core/apiutils/_utils.py +34 -0
- sagemaker/core/base_deserializers.py +35 -0
- sagemaker/core/base_serializers.py +35 -0
- sagemaker/core/clarify/__init__.py +2898 -0
- sagemaker/core/collection.py +467 -0
- sagemaker/core/common_utils.py +2281 -0
- sagemaker/core/compute_resource_requirements/__init__.py +18 -0
- sagemaker/core/compute_resource_requirements/resource_requirements.py +94 -0
- sagemaker/core/config/__init__.py +181 -0
- sagemaker/core/config/config.py +238 -0
- sagemaker/core/config/config_manager.py +595 -0
- sagemaker/core/config/config_schema.py +1220 -0
- sagemaker/core/config/config_utils.py +297 -0
- {sagemaker_core/main → sagemaker/core}/config_schema.py +410 -4
- sagemaker/core/constants.py +73 -0
- sagemaker/core/content_types.py +137 -0
- sagemaker/core/debugger/__init__.py +39 -0
- sagemaker/core/debugger/debugger.py +945 -0
- sagemaker/core/debugger/framework_profile.py +292 -0
- sagemaker/core/debugger/metrics_config.py +468 -0
- sagemaker/core/debugger/profiler.py +42 -0
- sagemaker/core/debugger/profiler_config.py +190 -0
- sagemaker/core/debugger/profiler_constants.py +40 -0
- sagemaker/core/debugger/utils.py +148 -0
- sagemaker/core/deprecations.py +254 -0
- sagemaker/core/deserializers/__init__.py +10 -0
- sagemaker/core/deserializers/base.py +424 -0
- sagemaker/core/deserializers/implementations.py +157 -0
- sagemaker/core/drift_check_baselines.py +106 -0
- sagemaker/core/enums.py +51 -0
- sagemaker/core/environment_variables.py +101 -0
- sagemaker/core/exceptions.py +108 -0
- sagemaker/core/experiments/__init__.py +53 -0
- sagemaker/core/experiments/_api_types.py +251 -0
- sagemaker/core/experiments/_environment.py +124 -0
- sagemaker/core/experiments/_helper.py +294 -0
- sagemaker/core/experiments/_metrics.py +333 -0
- sagemaker/core/experiments/_run_context.py +58 -0
- sagemaker/core/experiments/_utils.py +216 -0
- sagemaker/core/experiments/experiment.py +244 -0
- sagemaker/core/experiments/run.py +970 -0
- sagemaker/core/experiments/trial.py +296 -0
- sagemaker/core/experiments/trial_component.py +387 -0
- sagemaker/core/explainer/__init__.py +24 -0
- sagemaker/core/explainer/clarify_explainer_config.py +298 -0
- sagemaker/core/explainer/explainer_config.py +44 -0
- sagemaker/core/fw_utils.py +1176 -0
- sagemaker/core/git_utils.py +349 -0
- sagemaker/core/helper/pipeline_variable.py +82 -0
- sagemaker/core/helper/session_helper.py +2965 -0
- sagemaker/core/huggingface/__init__.py +29 -0
- sagemaker/core/huggingface/llm_utils.py +150 -0
- sagemaker/core/huggingface/processing.py +139 -0
- sagemaker/core/huggingface/training_compiler/config.py +167 -0
- sagemaker/core/hyperparameters.py +172 -0
- sagemaker/core/image_retriever/__init__.py +3 -0
- sagemaker/core/image_retriever/image_retriever.py +640 -0
- sagemaker/core/image_retriever/image_retriever_utils.py +511 -0
- sagemaker/core/image_retriever/test.py +7 -0
- sagemaker/core/image_uri_config/__init__.py +13 -0
- sagemaker/core/image_uri_config/autogluon.json +1335 -0
- sagemaker/core/image_uri_config/blazingtext.json +50 -0
- sagemaker/core/image_uri_config/chainer.json +104 -0
- sagemaker/core/image_uri_config/clarify.json +39 -0
- sagemaker/core/image_uri_config/coach-mxnet.json +70 -0
- sagemaker/core/image_uri_config/coach-tensorflow.json +186 -0
- sagemaker/core/image_uri_config/data-wrangler.json +91 -0
- sagemaker/core/image_uri_config/debugger.json +34 -0
- sagemaker/core/image_uri_config/detailed-profiler.json +18 -0
- sagemaker/core/image_uri_config/djl-deepspeed.json +385 -0
- sagemaker/core/image_uri_config/djl-fastertransformer.json +167 -0
- sagemaker/core/image_uri_config/djl-lmi.json +136 -0
- sagemaker/core/image_uri_config/djl-neuronx.json +258 -0
- sagemaker/core/image_uri_config/djl-tensorrtllm.json +262 -0
- sagemaker/core/image_uri_config/factorization-machines.json +50 -0
- sagemaker/core/image_uri_config/forecasting-deepar.json +50 -0
- sagemaker/core/image_uri_config/huggingface-llm-neuronx.json +660 -0
- sagemaker/core/image_uri_config/huggingface-llm.json +1158 -0
- sagemaker/core/image_uri_config/huggingface-neuron.json +52 -0
- sagemaker/core/image_uri_config/huggingface-neuronx.json +510 -0
- sagemaker/core/image_uri_config/huggingface-tei-cpu.json +298 -0
- sagemaker/core/image_uri_config/huggingface-tei.json +298 -0
- sagemaker/core/image_uri_config/huggingface-training-compiler.json +195 -0
- sagemaker/core/image_uri_config/huggingface.json +2138 -0
- sagemaker/core/image_uri_config/hyperpod-recipes-neuron.json +52 -0
- sagemaker/core/image_uri_config/image-classification-neo.json +43 -0
- sagemaker/core/image_uri_config/image-classification.json +50 -0
- sagemaker/core/image_uri_config/inferentia-mxnet.json +88 -0
- sagemaker/core/image_uri_config/inferentia-pytorch.json +127 -0
- sagemaker/core/image_uri_config/inferentia-tensorflow.json +88 -0
- sagemaker/core/image_uri_config/instance_gpu_info.json +782 -0
- sagemaker/core/image_uri_config/ipinsights.json +50 -0
- sagemaker/core/image_uri_config/kmeans.json +50 -0
- sagemaker/core/image_uri_config/knn.json +50 -0
- sagemaker/core/image_uri_config/lda.json +26 -0
- sagemaker/core/image_uri_config/linear-learner.json +50 -0
- sagemaker/core/image_uri_config/model-monitor.json +42 -0
- sagemaker/core/image_uri_config/mxnet.json +1154 -0
- sagemaker/core/image_uri_config/neo-mxnet.json +64 -0
- sagemaker/core/image_uri_config/neo-pytorch.json +341 -0
- sagemaker/core/image_uri_config/neo-tensorflow.json +109 -0
- sagemaker/core/image_uri_config/ntm.json +50 -0
- sagemaker/core/image_uri_config/object-detection.json +50 -0
- sagemaker/core/image_uri_config/object2vec.json +50 -0
- sagemaker/core/image_uri_config/pca.json +50 -0
- sagemaker/core/image_uri_config/pytorch-neuron.json +43 -0
- sagemaker/core/image_uri_config/pytorch-smp.json +218 -0
- sagemaker/core/image_uri_config/pytorch-training-compiler.json +80 -0
- sagemaker/core/image_uri_config/pytorch.json +3101 -0
- sagemaker/core/image_uri_config/randomcutforest.json +50 -0
- sagemaker/core/image_uri_config/ray-pytorch.json +46 -0
- sagemaker/core/image_uri_config/ray-tensorflow.json +194 -0
- sagemaker/core/image_uri_config/sagemaker-base-python.json +46 -0
- sagemaker/core/image_uri_config/sagemaker-distribution.json +37 -0
- sagemaker/core/image_uri_config/sagemaker-geospatial.json +13 -0
- sagemaker/core/image_uri_config/sagemaker-tritonserver.json +212 -0
- sagemaker/core/image_uri_config/semantic-segmentation.json +50 -0
- sagemaker/core/image_uri_config/seq2seq.json +50 -0
- sagemaker/core/image_uri_config/sklearn.json +446 -0
- sagemaker/core/image_uri_config/spark.json +280 -0
- sagemaker/core/image_uri_config/sparkml-serving.json +97 -0
- sagemaker/core/image_uri_config/stabilityai.json +53 -0
- sagemaker/core/image_uri_config/tensorflow.json +5086 -0
- sagemaker/core/image_uri_config/vw.json +25 -0
- sagemaker/core/image_uri_config/xgboost-neo.json +43 -0
- sagemaker/core/image_uri_config/xgboost.json +888 -0
- sagemaker/core/image_uris.py +810 -0
- sagemaker/core/inference_config.py +144 -0
- sagemaker/core/inference_recommender/__init__.py +18 -0
- sagemaker/core/inference_recommender/inference_recommender_mixin.py +622 -0
- sagemaker/core/inputs.py +366 -0
- sagemaker/core/instance_group.py +61 -0
- sagemaker/core/instance_types.py +164 -0
- sagemaker/core/instance_types_gpu_info.py +43 -0
- sagemaker/core/interactive_apps/__init__.py +41 -0
- sagemaker/core/interactive_apps/base_interactive_app.py +204 -0
- sagemaker/core/interactive_apps/detail_profiler_app.py +139 -0
- sagemaker/core/interactive_apps/tensorboard.py +149 -0
- sagemaker/core/iterators.py +186 -0
- sagemaker/core/job.py +380 -0
- sagemaker/core/jumpstart/__init__.py +156 -0
- sagemaker/core/jumpstart/accessors.py +390 -0
- sagemaker/core/jumpstart/artifacts/__init__.py +69 -0
- sagemaker/core/jumpstart/artifacts/environment_variables.py +252 -0
- sagemaker/core/jumpstart/artifacts/hyperparameters.py +120 -0
- sagemaker/core/jumpstart/artifacts/image_uris.py +139 -0
- sagemaker/core/jumpstart/artifacts/incremental_training.py +87 -0
- sagemaker/core/jumpstart/artifacts/instance_types.py +223 -0
- sagemaker/core/jumpstart/artifacts/kwargs.py +289 -0
- sagemaker/core/jumpstart/artifacts/metric_definitions.py +117 -0
- sagemaker/core/jumpstart/artifacts/model_packages.py +202 -0
- sagemaker/core/jumpstart/artifacts/model_uris.py +252 -0
- sagemaker/core/jumpstart/artifacts/payloads.py +96 -0
- sagemaker/core/jumpstart/artifacts/predictors.py +540 -0
- sagemaker/core/jumpstart/artifacts/resource_names.py +86 -0
- sagemaker/core/jumpstart/artifacts/resource_requirements.py +162 -0
- sagemaker/core/jumpstart/artifacts/script_uris.py +172 -0
- sagemaker/core/jumpstart/cache.py +663 -0
- sagemaker/core/jumpstart/configs.py +50 -0
- sagemaker/core/jumpstart/constants.py +198 -0
- sagemaker/core/jumpstart/deserializers.py +81 -0
- sagemaker/core/jumpstart/document.py +76 -0
- sagemaker/core/jumpstart/enums.py +168 -0
- sagemaker/core/jumpstart/exceptions.py +236 -0
- sagemaker/core/jumpstart/factory/utils.py +833 -0
- sagemaker/core/jumpstart/filters.py +597 -0
- sagemaker/core/jumpstart/hub/__init__.py +0 -0
- sagemaker/core/jumpstart/hub/constants.py +16 -0
- sagemaker/core/jumpstart/hub/hub.py +291 -0
- sagemaker/core/jumpstart/hub/interfaces.py +936 -0
- sagemaker/core/jumpstart/hub/parser_utils.py +70 -0
- sagemaker/core/jumpstart/hub/parsers.py +288 -0
- sagemaker/core/jumpstart/hub/types.py +35 -0
- sagemaker/core/jumpstart/hub/utils.py +260 -0
- sagemaker/core/jumpstart/models.py +499 -0
- sagemaker/core/jumpstart/notebook_utils.py +575 -0
- sagemaker/core/jumpstart/parameters.py +20 -0
- sagemaker/core/jumpstart/payload_utils.py +239 -0
- sagemaker/core/jumpstart/region_config.json +163 -0
- sagemaker/core/jumpstart/search.py +171 -0
- sagemaker/core/jumpstart/serializers.py +81 -0
- sagemaker/core/jumpstart/session_utils.py +234 -0
- sagemaker/core/jumpstart/types.py +3044 -0
- sagemaker/core/jumpstart/utils.py +1731 -0
- sagemaker/core/jumpstart/validators.py +257 -0
- sagemaker/core/lambda_helper.py +312 -0
- sagemaker/core/lineage/__init__.py +42 -0
- sagemaker/core/lineage/_api_types.py +239 -0
- sagemaker/core/lineage/_utils.py +49 -0
- sagemaker/core/lineage/action.py +345 -0
- sagemaker/core/lineage/artifact.py +646 -0
- sagemaker/core/lineage/association.py +190 -0
- sagemaker/core/lineage/context.py +505 -0
- sagemaker/core/lineage/lineage_trial_component.py +191 -0
- sagemaker/core/lineage/query.py +732 -0
- sagemaker/core/lineage/visualizer.py +346 -0
- sagemaker/core/local/__init__.py +18 -0
- sagemaker/core/local/data.py +413 -0
- sagemaker/core/local/entities.py +678 -0
- sagemaker/core/local/exceptions.py +17 -0
- sagemaker/core/local/image.py +1243 -0
- sagemaker/core/local/local_session.py +739 -0
- sagemaker/core/local/utils.py +245 -0
- sagemaker/core/logs.py +181 -0
- sagemaker/core/metadata_properties.py +56 -0
- sagemaker/core/metric_definitions.py +91 -0
- sagemaker/core/mlflow/__init__.py +38 -0
- sagemaker/core/mlflow/forward_sagemaker_metrics.py +44 -0
- sagemaker/core/model_card/__init__.py +26 -0
- sagemaker/core/model_life_cycle.py +51 -0
- sagemaker/core/model_metrics.py +160 -0
- sagemaker/core/model_monitor/__init__.py +66 -0
- sagemaker/core/model_monitor/clarify_model_monitoring.py +1495 -0
- sagemaker/core/model_monitor/cron_expression_generator.py +82 -0
- sagemaker/core/model_monitor/data_capture_config.py +115 -0
- sagemaker/core/model_monitor/data_quality_monitoring_config.py +66 -0
- sagemaker/core/model_monitor/dataset_format.py +102 -0
- sagemaker/core/model_monitor/model_monitoring.py +4266 -0
- sagemaker/core/model_monitor/monitoring_alert.py +76 -0
- sagemaker/core/model_monitor/monitoring_files.py +506 -0
- sagemaker/core/model_monitor/utils.py +793 -0
- sagemaker/core/model_registry.py +480 -0
- sagemaker/core/model_uris.py +97 -0
- sagemaker/core/modules/__init__.py +19 -0
- sagemaker/core/modules/configs.py +226 -0
- sagemaker/core/modules/constants.py +37 -0
- sagemaker/core/modules/distributed.py +182 -0
- sagemaker/core/modules/local_core/__init__.py +0 -0
- sagemaker/core/modules/local_core/local_container.py +605 -0
- sagemaker/core/modules/templates.py +83 -0
- sagemaker/core/modules/train/__init__.py +14 -0
- sagemaker/core/modules/train/container_drivers/__init__.py +14 -0
- sagemaker/core/modules/train/container_drivers/common/__init__.py +14 -0
- sagemaker/core/modules/train/container_drivers/common/utils.py +213 -0
- sagemaker/core/modules/train/container_drivers/distributed_drivers/__init__.py +14 -0
- sagemaker/core/modules/train/container_drivers/distributed_drivers/basic_script_driver.py +81 -0
- sagemaker/core/modules/train/container_drivers/distributed_drivers/mpi_driver.py +123 -0
- sagemaker/core/modules/train/container_drivers/distributed_drivers/mpi_utils.py +302 -0
- sagemaker/core/modules/train/container_drivers/distributed_drivers/torchrun_driver.py +129 -0
- sagemaker/core/modules/train/container_drivers/scripts/__init__.py +14 -0
- sagemaker/core/modules/train/container_drivers/scripts/environment.py +305 -0
- sagemaker/core/modules/train/sm_recipes/__init__.py +0 -0
- sagemaker/core/modules/train/sm_recipes/utils.py +330 -0
- sagemaker/core/modules/types.py +19 -0
- sagemaker/core/modules/utils.py +194 -0
- sagemaker/core/network.py +185 -0
- sagemaker/core/parameter.py +173 -0
- sagemaker/core/payloads.py +185 -0
- sagemaker/core/processing.py +1597 -0
- sagemaker/core/remote_function/__init__.py +19 -0
- sagemaker/core/remote_function/checkpoint_location.py +47 -0
- sagemaker/core/remote_function/client.py +1285 -0
- sagemaker/core/remote_function/core/__init__.py +0 -0
- sagemaker/core/remote_function/core/_custom_dispatch_table.py +72 -0
- sagemaker/core/remote_function/core/pipeline_variables.py +353 -0
- sagemaker/core/remote_function/core/serialization.py +422 -0
- sagemaker/core/remote_function/core/stored_function.py +226 -0
- sagemaker/core/remote_function/custom_file_filter.py +128 -0
- sagemaker/core/remote_function/errors.py +104 -0
- sagemaker/core/remote_function/invoke_function.py +172 -0
- sagemaker/core/remote_function/job.py +2140 -0
- sagemaker/core/remote_function/logging_config.py +38 -0
- sagemaker/core/remote_function/runtime_environment/__init__.py +14 -0
- sagemaker/core/remote_function/runtime_environment/bootstrap_runtime_environment.py +605 -0
- sagemaker/core/remote_function/runtime_environment/mpi_utils_remote.py +252 -0
- sagemaker/core/remote_function/runtime_environment/runtime_environment_manager.py +554 -0
- sagemaker/core/remote_function/runtime_environment/spark_app.py +18 -0
- sagemaker/core/remote_function/spark_config.py +149 -0
- sagemaker/core/resource_requirements.py +168 -0
- {sagemaker_core/main → sagemaker/core}/resources.py +20121 -11728
- sagemaker/core/s3/__init__.py +41 -0
- sagemaker/core/s3/client.py +367 -0
- sagemaker/core/s3/utils.py +175 -0
- sagemaker/core/script_uris.py +93 -0
- sagemaker/core/serializers/__init__.py +11 -0
- sagemaker/core/serializers/base.py +510 -0
- sagemaker/core/serializers/implementations.py +159 -0
- sagemaker/core/serializers/utils.py +223 -0
- sagemaker/core/serverless_inference_config.py +63 -0
- sagemaker/core/session_settings.py +55 -0
- sagemaker/core/shapes/__init__.py +3 -0
- sagemaker/core/shapes/model_card_shapes.py +159 -0
- {sagemaker_core/main → sagemaker/core/shapes}/shapes.py +6384 -1865
- sagemaker/core/spark/__init__.py +16 -0
- sagemaker/core/spark/defaults.py +16 -0
- sagemaker/core/spark/processing.py +1380 -0
- sagemaker/core/telemetry/__init__.py +23 -0
- sagemaker/core/telemetry/constants.py +84 -0
- sagemaker/core/telemetry/telemetry_logging.py +284 -0
- sagemaker/core/tools/__init__.py +1 -0
- {sagemaker_core → sagemaker/core}/tools/codegen.py +4 -4
- {sagemaker_core → sagemaker/core}/tools/constants.py +23 -15
- {sagemaker_core → sagemaker/core}/tools/data_extractor.py +1 -1
- {sagemaker_core → sagemaker/core}/tools/method.py +1 -1
- sagemaker/core/tools/model_card/generate_model_card_from_schema.py +562 -0
- {sagemaker_core → sagemaker/core}/tools/resources_codegen.py +165 -98
- {sagemaker_core → sagemaker/core}/tools/resources_extractor.py +5 -13
- {sagemaker_core → sagemaker/core}/tools/shapes_codegen.py +16 -17
- {sagemaker_core → sagemaker/core}/tools/shapes_extractor.py +29 -67
- {sagemaker_core → sagemaker/core}/tools/templates.py +39 -17
- sagemaker/core/training/__init__.py +14 -0
- sagemaker/core/training/configs.py +333 -0
- sagemaker/core/training/constants.py +37 -0
- sagemaker/core/training/utils.py +77 -0
- sagemaker/core/training_compiler/__init__.py +16 -0
- sagemaker/core/training_compiler/config.py +197 -0
- sagemaker/core/training_compiler_config.py +197 -0
- sagemaker/core/transformer.py +793 -0
- sagemaker/core/user_agent.py +76 -0
- sagemaker/core/utilities/__init__.py +24 -0
- sagemaker/core/utilities/cache.py +169 -0
- sagemaker/core/utilities/search_expression.py +133 -0
- sagemaker/core/utils/__init__.py +48 -0
- sagemaker/core/utils/code_injection/__init__.py +0 -0
- {sagemaker_core/main → sagemaker/core/utils}/code_injection/codec.py +2 -2
- {sagemaker_core/main → sagemaker/core/utils}/code_injection/shape_dag.py +6479 -136
- {sagemaker_core/main → sagemaker/core/utils}/exceptions.py +8 -8
- sagemaker_core/main/default_configs_helper.py → sagemaker/core/utils/intelligent_defaults_helper.py +5 -6
- {sagemaker_core/main → sagemaker/core/utils}/logs.py +1 -2
- {sagemaker_core/main → sagemaker/core/utils}/utils.py +25 -20
- sagemaker/core/workflow/__init__.py +152 -0
- sagemaker/core/workflow/conditions.py +313 -0
- sagemaker/core/workflow/entities.py +58 -0
- sagemaker/core/workflow/execution_variables.py +89 -0
- sagemaker/core/workflow/functions.py +193 -0
- sagemaker/core/workflow/parameters.py +222 -0
- sagemaker/core/workflow/pipeline_context.py +394 -0
- sagemaker/core/workflow/pipeline_definition_config.py +31 -0
- sagemaker/core/workflow/properties.py +285 -0
- sagemaker/core/workflow/step_outputs.py +65 -0
- sagemaker/core/workflow/utilities.py +507 -0
- sagemaker/lineage/__init__.py +33 -0
- sagemaker/lineage/action.py +28 -0
- sagemaker/lineage/artifact.py +28 -0
- sagemaker/lineage/context.py +28 -0
- sagemaker/lineage/lineage_trial_component.py +28 -0
- {sagemaker_core-1.0.47.dist-info → sagemaker_core-2.1.1.dist-info}/METADATA +28 -9
- sagemaker_core-2.1.1.dist-info/RECORD +355 -0
- sagemaker_core-2.1.1.dist-info/top_level.txt +1 -0
- sagemaker_core/__init__.py +0 -4
- sagemaker_core/_version.py +0 -3
- sagemaker_core/helper/session_helper.py +0 -769
- sagemaker_core/resources/__init__.py +0 -1
- sagemaker_core/shapes/__init__.py +0 -1
- sagemaker_core/tools/__init__.py +0 -1
- sagemaker_core-1.0.47.dist-info/RECORD +0 -35
- sagemaker_core-1.0.47.dist-info/top_level.txt +0 -1
- {sagemaker_core → sagemaker/core}/helper/__init__.py +0 -0
- {sagemaker_core/main → sagemaker/core/huggingface/training_compiler}/__init__.py +0 -0
- {sagemaker_core/main/code_injection → sagemaker/core/jumpstart/factory}/__init__.py +0 -0
- {sagemaker_core/main → sagemaker/core/utils}/code_injection/base.py +0 -0
- {sagemaker_core/main → sagemaker/core/utils}/code_injection/constants.py +0 -0
- {sagemaker_core/main → sagemaker/core/utils}/user_agent.py +0 -0
- {sagemaker_core-1.0.47.dist-info → sagemaker_core-2.1.1.dist-info}/WHEEL +0 -0
- {sagemaker_core-1.0.47.dist-info → sagemaker_core-2.1.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,76 @@
|
|
|
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
|
+
"""Placeholder docstring"""
|
|
14
|
+
from __future__ import absolute_import
|
|
15
|
+
|
|
16
|
+
import json
|
|
17
|
+
import os
|
|
18
|
+
|
|
19
|
+
SDK_PREFIX = "AWS-SageMaker-Python-SDK"
|
|
20
|
+
STUDIO_PREFIX = "AWS-SageMaker-Studio"
|
|
21
|
+
NOTEBOOK_PREFIX = "AWS-SageMaker-Notebook-Instance"
|
|
22
|
+
|
|
23
|
+
NOTEBOOK_METADATA_FILE = "/etc/opt/ml/sagemaker-notebook-instance-version.txt"
|
|
24
|
+
STUDIO_METADATA_FILE = "/opt/ml/metadata/resource-metadata.json"
|
|
25
|
+
|
|
26
|
+
SDK_VERSION ="3.0"
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def process_notebook_metadata_file():
|
|
30
|
+
"""Check if the platform is SageMaker Notebook, if yes, return the InstanceType
|
|
31
|
+
|
|
32
|
+
Returns:
|
|
33
|
+
str: The InstanceType of the SageMaker Notebook if it exists, otherwise None
|
|
34
|
+
"""
|
|
35
|
+
if os.path.exists(NOTEBOOK_METADATA_FILE):
|
|
36
|
+
with open(NOTEBOOK_METADATA_FILE, "r") as sagemaker_nbi_file:
|
|
37
|
+
return sagemaker_nbi_file.read().strip()
|
|
38
|
+
|
|
39
|
+
return None
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def process_studio_metadata_file():
|
|
43
|
+
"""Check if the platform is SageMaker Studio, if yes, return the AppType
|
|
44
|
+
|
|
45
|
+
Returns:
|
|
46
|
+
str: The AppType of the SageMaker Studio if it exists, otherwise None
|
|
47
|
+
"""
|
|
48
|
+
if os.path.exists(STUDIO_METADATA_FILE):
|
|
49
|
+
with open(STUDIO_METADATA_FILE, "r") as sagemaker_studio_file:
|
|
50
|
+
metadata = json.load(sagemaker_studio_file)
|
|
51
|
+
return metadata.get("AppType")
|
|
52
|
+
|
|
53
|
+
return None
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def get_user_agent_extra_suffix():
|
|
57
|
+
"""Get the user agent extra suffix string specific to SageMaker Python SDK
|
|
58
|
+
|
|
59
|
+
Adhers to new boto recommended User-Agent 2.0 header format
|
|
60
|
+
|
|
61
|
+
Returns:
|
|
62
|
+
str: The user agent extra suffix string to be appended
|
|
63
|
+
"""
|
|
64
|
+
suffix = "lib/{}#{}".format(SDK_PREFIX, SDK_VERSION)
|
|
65
|
+
|
|
66
|
+
# Get the notebook instance type and prepend it to the user agent string if exists
|
|
67
|
+
notebook_instance_type = process_notebook_metadata_file()
|
|
68
|
+
if notebook_instance_type:
|
|
69
|
+
suffix = "{} md/{}#{}".format(suffix, NOTEBOOK_PREFIX, notebook_instance_type)
|
|
70
|
+
|
|
71
|
+
# Get the studio app type and prepend it to the user agent string if exists
|
|
72
|
+
studio_app_type = process_studio_metadata_file()
|
|
73
|
+
if studio_app_type:
|
|
74
|
+
suffix = "{} md/{}#{}".format(suffix, STUDIO_PREFIX, studio_app_type)
|
|
75
|
+
|
|
76
|
+
return suffix
|
|
@@ -0,0 +1,24 @@
|
|
|
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 for SageMaker Python SDK."""
|
|
14
|
+
from __future__ import absolute_import
|
|
15
|
+
|
|
16
|
+
from sagemaker.core.utilities.cache import LRUCache # noqa: F401
|
|
17
|
+
from sagemaker.core.utilities.search_expression import ( # noqa: F401
|
|
18
|
+
BooleanOperator,
|
|
19
|
+
Filter,
|
|
20
|
+
NestedFilter,
|
|
21
|
+
Operator,
|
|
22
|
+
SearchExpression,
|
|
23
|
+
SearchObject,
|
|
24
|
+
)
|
|
@@ -0,0 +1,169 @@
|
|
|
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
|
+
"""This module defines a LRU cache class."""
|
|
14
|
+
from __future__ import absolute_import
|
|
15
|
+
|
|
16
|
+
import datetime
|
|
17
|
+
import collections
|
|
18
|
+
from typing import Tuple, TypeVar, Generic, Callable, Optional
|
|
19
|
+
|
|
20
|
+
KeyType = TypeVar("KeyType")
|
|
21
|
+
ValType = TypeVar("ValType")
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class LRUCache(Generic[KeyType, ValType]):
|
|
25
|
+
"""Class that implements LRU cache with expiring items.
|
|
26
|
+
|
|
27
|
+
LRU caches remove items in a FIFO manner, such that the oldest
|
|
28
|
+
items to be used are the first to be removed.
|
|
29
|
+
If you attempt to retrieve a cache item that is older than the
|
|
30
|
+
expiration time, the item will be invalidated.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
class Element:
|
|
34
|
+
"""Class describes the values in the cache.
|
|
35
|
+
|
|
36
|
+
This object stores the value itself as well as a timestamp so that this
|
|
37
|
+
element can be invalidated if it becomes too old.
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
def __init__(self, value: ValType, creation_time: datetime.datetime):
|
|
41
|
+
"""Initialize an ``Element`` instance for ``LRUCache``.
|
|
42
|
+
|
|
43
|
+
Args:
|
|
44
|
+
value (ValType): Value that is stored in cache.
|
|
45
|
+
creation_time (datetime.datetime): Time at which cache item was created.
|
|
46
|
+
"""
|
|
47
|
+
self.value = value
|
|
48
|
+
self.creation_time = creation_time
|
|
49
|
+
|
|
50
|
+
def __init__(
|
|
51
|
+
self,
|
|
52
|
+
max_cache_items: int,
|
|
53
|
+
expiration_horizon: datetime.timedelta,
|
|
54
|
+
retrieval_function: Callable[[KeyType, ValType], ValType],
|
|
55
|
+
) -> None:
|
|
56
|
+
"""Initialize an ``LRUCache`` instance.
|
|
57
|
+
|
|
58
|
+
Args:
|
|
59
|
+
max_cache_items (int): Maximum number of items to store in cache.
|
|
60
|
+
expiration_horizon (datetime.timedelta): Maximum time duration a cache element can
|
|
61
|
+
persist before being invalidated.
|
|
62
|
+
retrieval_function (Callable[[KeyType, ValType], ValType]): Function which maps cache
|
|
63
|
+
keys and current values to new values. This function must have kwarg arguments
|
|
64
|
+
``key`` and ``value``. This function is called as a fallback when the key
|
|
65
|
+
is not found in the cache, or a key has expired.
|
|
66
|
+
|
|
67
|
+
"""
|
|
68
|
+
self._max_cache_items = max_cache_items
|
|
69
|
+
self._lru_cache: collections.OrderedDict = collections.OrderedDict()
|
|
70
|
+
self._expiration_horizon = expiration_horizon
|
|
71
|
+
self._retrieval_function = retrieval_function
|
|
72
|
+
|
|
73
|
+
def __len__(self) -> int:
|
|
74
|
+
"""Returns number of elements in cache."""
|
|
75
|
+
return len(self._lru_cache)
|
|
76
|
+
|
|
77
|
+
def __contains__(self, key: KeyType) -> bool:
|
|
78
|
+
"""Returns True if key is found in cache, False otherwise.
|
|
79
|
+
|
|
80
|
+
Args:
|
|
81
|
+
key (KeyType): Key in cache to retrieve.
|
|
82
|
+
"""
|
|
83
|
+
return key in self._lru_cache
|
|
84
|
+
|
|
85
|
+
def clear(self) -> None:
|
|
86
|
+
"""Deletes all elements from the cache."""
|
|
87
|
+
self._lru_cache.clear()
|
|
88
|
+
|
|
89
|
+
def get(
|
|
90
|
+
self, key: KeyType, data_source_fallback: Optional[bool] = True
|
|
91
|
+
) -> Tuple[ValType, bool]:
|
|
92
|
+
"""Returns value corresponding to key in cache and boolean indicating cache hit.
|
|
93
|
+
|
|
94
|
+
Args:
|
|
95
|
+
key (KeyType): Key in cache to retrieve.
|
|
96
|
+
data_source_fallback (Optional[bool]): True if data should be retrieved if
|
|
97
|
+
it's stale or not in cache. Default: True.
|
|
98
|
+
|
|
99
|
+
Raises:
|
|
100
|
+
KeyError: If key is not found in cache or is outdated and
|
|
101
|
+
``data_source_fallback`` is False.
|
|
102
|
+
"""
|
|
103
|
+
if data_source_fallback:
|
|
104
|
+
if key in self._lru_cache:
|
|
105
|
+
return self._get_item(key, False), True
|
|
106
|
+
self.put(key)
|
|
107
|
+
return self._get_item(key, False), False
|
|
108
|
+
return self._get_item(key, True), True
|
|
109
|
+
|
|
110
|
+
def put(self, key: KeyType, value: Optional[ValType] = None) -> None:
|
|
111
|
+
"""Adds key to cache using ``retrieval_function``.
|
|
112
|
+
|
|
113
|
+
If value is provided, this is used instead. If the key is already in cache,
|
|
114
|
+
the old element is removed. If the cache size exceeds the size limit, old
|
|
115
|
+
elements are removed in order to meet the limit.
|
|
116
|
+
|
|
117
|
+
Args:
|
|
118
|
+
key (KeyType): Key in cache to retrieve.
|
|
119
|
+
value (Optional[ValType]): Value to store for key. Default: None.
|
|
120
|
+
"""
|
|
121
|
+
curr_value = None
|
|
122
|
+
if key in self._lru_cache:
|
|
123
|
+
curr_value = self._lru_cache.pop(key)
|
|
124
|
+
|
|
125
|
+
while len(self._lru_cache) >= self._max_cache_items:
|
|
126
|
+
self._lru_cache.popitem(last=False)
|
|
127
|
+
|
|
128
|
+
if value is None:
|
|
129
|
+
value = self._retrieval_function( # type: ignore
|
|
130
|
+
key=key, value=curr_value.element if curr_value else None
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
self._lru_cache[key] = self.Element(
|
|
134
|
+
value=value, creation_time=datetime.datetime.now(tz=datetime.timezone.utc)
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
def _get_item(self, key: KeyType, fail_on_old_value: bool) -> ValType:
|
|
138
|
+
"""Returns value from cache corresponding to key.
|
|
139
|
+
|
|
140
|
+
If ``fail_on_old_value``, a KeyError is raised instead of a new value
|
|
141
|
+
getting fetched.
|
|
142
|
+
|
|
143
|
+
Args:
|
|
144
|
+
key (KeyType): Key in cache to retrieve.
|
|
145
|
+
fail_on_old_value (bool): True if a KeyError is raised when the cache value
|
|
146
|
+
is old.
|
|
147
|
+
|
|
148
|
+
Raises:
|
|
149
|
+
KeyError: If key is not in cache or if key is old in cache
|
|
150
|
+
and fail_on_old_value is True.
|
|
151
|
+
"""
|
|
152
|
+
try:
|
|
153
|
+
element = self._lru_cache.pop(key)
|
|
154
|
+
curr_time = datetime.datetime.now(tz=datetime.timezone.utc)
|
|
155
|
+
element_age = curr_time - element.creation_time
|
|
156
|
+
if element_age > self._expiration_horizon:
|
|
157
|
+
if fail_on_old_value:
|
|
158
|
+
raise KeyError(
|
|
159
|
+
f"{key} has aged beyond allowed time {self._expiration_horizon}. "
|
|
160
|
+
f"Element created at {element.creation_time}."
|
|
161
|
+
)
|
|
162
|
+
element.value = self._retrieval_function( # type: ignore
|
|
163
|
+
key=key, value=element.value
|
|
164
|
+
)
|
|
165
|
+
element.creation_time = curr_time
|
|
166
|
+
self._lru_cache[key] = element
|
|
167
|
+
return element.value
|
|
168
|
+
except KeyError:
|
|
169
|
+
raise KeyError(f"{key} not found in LRUCache!")
|
|
@@ -0,0 +1,133 @@
|
|
|
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
|
+
"""Simplify Search Expression by provide a simplified DSL"""
|
|
14
|
+
from __future__ import absolute_import
|
|
15
|
+
|
|
16
|
+
from enum import Enum, unique
|
|
17
|
+
|
|
18
|
+
from sagemaker.core.apiutils._base_types import ApiObject
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
# TODO: we should update the lineage to use search expressions
|
|
22
|
+
# defined here in a separate change
|
|
23
|
+
@unique
|
|
24
|
+
class Operator(Enum):
|
|
25
|
+
"""Search operators"""
|
|
26
|
+
|
|
27
|
+
EQUALS = "Equals"
|
|
28
|
+
NOT_EQUALS = "NotEquals"
|
|
29
|
+
GREATER_THAN = "GreaterThan"
|
|
30
|
+
GREATER_THAN_OR_EQUAL = "GreaterThanOrEqualTo"
|
|
31
|
+
LESS_THAN = "LessThan"
|
|
32
|
+
LESS_THAN_OR_EQUAL = "LessThanOrEqualTo"
|
|
33
|
+
CONTAINS = "Contains"
|
|
34
|
+
EXISTS = "Exists"
|
|
35
|
+
NOT_EXISTS = "NotExists"
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
@unique
|
|
39
|
+
class BooleanOperator(Enum):
|
|
40
|
+
"""Boolean search operation enum"""
|
|
41
|
+
|
|
42
|
+
AND = "And"
|
|
43
|
+
OR = "Or"
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class SearchObject(ApiObject):
|
|
47
|
+
"""Search Object"""
|
|
48
|
+
|
|
49
|
+
def to_boto(self):
|
|
50
|
+
"""Convert a search object to boto"""
|
|
51
|
+
return ApiObject.to_boto(self)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class Filter(SearchObject):
|
|
55
|
+
"""A Python class represent a Search Filter object."""
|
|
56
|
+
|
|
57
|
+
name = None
|
|
58
|
+
operator = None
|
|
59
|
+
value = None
|
|
60
|
+
|
|
61
|
+
def __init__(self, name, operator=None, value=None, **kwargs):
|
|
62
|
+
"""Construct a Filter object
|
|
63
|
+
|
|
64
|
+
Args:
|
|
65
|
+
name (str): filter field name
|
|
66
|
+
operator (Operator): one of Operator enum
|
|
67
|
+
value (str): value of the field
|
|
68
|
+
"""
|
|
69
|
+
super().__init__(**kwargs)
|
|
70
|
+
self.name = name
|
|
71
|
+
self.operator = None if operator is None else operator.value
|
|
72
|
+
self.value = value
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
class NestedFilter(SearchObject):
|
|
76
|
+
"""A Python class represent a Nested Filter object."""
|
|
77
|
+
|
|
78
|
+
nested_property_name = None
|
|
79
|
+
filters = None
|
|
80
|
+
|
|
81
|
+
def __init__(self, property_name, filters, **kwargs):
|
|
82
|
+
"""Construct a Nested Filter object
|
|
83
|
+
|
|
84
|
+
Args:
|
|
85
|
+
property_name (str): nested property name
|
|
86
|
+
filters (List[Filter]): list of Filter objects
|
|
87
|
+
"""
|
|
88
|
+
super().__init__(**kwargs)
|
|
89
|
+
self.nested_property_name = property_name
|
|
90
|
+
self.filters = list(map(lambda x: x.to_boto(), filters))
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
class SearchExpression(SearchObject):
|
|
94
|
+
"""A Python class representation of a Search Expression object.
|
|
95
|
+
|
|
96
|
+
A sample search expression defined in here:
|
|
97
|
+
https://boto3.amazonaws.com/v1/documentation/api/1.12.8/reference/services/sagemaker.html#SageMaker.Client.search
|
|
98
|
+
"""
|
|
99
|
+
|
|
100
|
+
filters = None
|
|
101
|
+
nested_filters = None
|
|
102
|
+
operator = None
|
|
103
|
+
sub_expressions = None
|
|
104
|
+
|
|
105
|
+
def __init__(
|
|
106
|
+
self,
|
|
107
|
+
filters=None,
|
|
108
|
+
nested_filters=None,
|
|
109
|
+
sub_expressions=None,
|
|
110
|
+
boolean_operator=BooleanOperator.AND,
|
|
111
|
+
**kwargs,
|
|
112
|
+
):
|
|
113
|
+
"""Construct a Search Expression object
|
|
114
|
+
|
|
115
|
+
Args:
|
|
116
|
+
filters (List[Filter]): list of Filter objects
|
|
117
|
+
nested_filters (List[NestedFilter]): list of Nested Filters objects
|
|
118
|
+
sub_expressions (List[SearchExpression]): list of Search Expression objects
|
|
119
|
+
boolean_operator (BooleanOperator): one of the boolean operator enums
|
|
120
|
+
"""
|
|
121
|
+
super().__init__(**kwargs)
|
|
122
|
+
if filters is None and nested_filters is None and sub_expressions is None:
|
|
123
|
+
raise ValueError(
|
|
124
|
+
"You must specify at least one subexpression, filter, or nested filter"
|
|
125
|
+
)
|
|
126
|
+
self.filters = None if filters is None else list(map(lambda x: x.to_boto(), filters))
|
|
127
|
+
self.nested_filters = (
|
|
128
|
+
None if nested_filters is None else list(map(lambda x: x.to_boto(), nested_filters))
|
|
129
|
+
)
|
|
130
|
+
self.sub_expressions = (
|
|
131
|
+
None if sub_expressions is None else list(map(lambda x: x.to_boto(), sub_expressions))
|
|
132
|
+
)
|
|
133
|
+
self.operator = boolean_operator.value
|
|
@@ -0,0 +1,48 @@
|
|
|
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 package for SageMaker Core.
|
|
14
|
+
|
|
15
|
+
This package re-exports commonly used utility functions from common_utils
|
|
16
|
+
for backward compatibility and convenience.
|
|
17
|
+
|
|
18
|
+
Note: Uses lazy imports via __getattr__ to avoid circular import issues.
|
|
19
|
+
"""
|
|
20
|
+
from __future__ import absolute_import
|
|
21
|
+
|
|
22
|
+
__all__ = [
|
|
23
|
+
"_save_model",
|
|
24
|
+
"download_file_from_url",
|
|
25
|
+
"custom_extractall_tarfile",
|
|
26
|
+
"download_file",
|
|
27
|
+
"download_folder",
|
|
28
|
+
"create_tar_file",
|
|
29
|
+
"repack_model",
|
|
30
|
+
"name_from_image",
|
|
31
|
+
"name_from_base",
|
|
32
|
+
"unique_name_from_base",
|
|
33
|
+
"unique_name_from_base_uuid4",
|
|
34
|
+
"base_name_from_image",
|
|
35
|
+
"base_from_name",
|
|
36
|
+
"sagemaker_timestamp",
|
|
37
|
+
"sagemaker_short_timestamp",
|
|
38
|
+
"get_config_value",
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def __getattr__(name):
|
|
43
|
+
"""Lazy import to avoid circular dependencies."""
|
|
44
|
+
if name in __all__:
|
|
45
|
+
from sagemaker.core import common_utils
|
|
46
|
+
|
|
47
|
+
return getattr(common_utils, name)
|
|
48
|
+
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
|
File without changes
|
|
@@ -15,8 +15,8 @@ import logging
|
|
|
15
15
|
from dataclasses import asdict
|
|
16
16
|
import re
|
|
17
17
|
|
|
18
|
-
from
|
|
19
|
-
from
|
|
18
|
+
from sagemaker.core.utils.code_injection.shape_dag import SHAPE_DAG
|
|
19
|
+
from sagemaker.core.utils.code_injection.constants import (
|
|
20
20
|
BASIC_TYPES,
|
|
21
21
|
STRUCTURE_TYPE,
|
|
22
22
|
LIST_TYPE,
|