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

@@ -4213,6 +4213,10 @@ SHAPE_DAG = {
4213
4213
  "members": [{"name": "PipelineArn", "shape": "PipelineArn", "type": "string"}],
4214
4214
  "type": "structure",
4215
4215
  },
4216
+ "DeleteProcessingJobRequest": {
4217
+ "members": [{"name": "ProcessingJobName", "shape": "ProcessingJobName", "type": "string"}],
4218
+ "type": "structure",
4219
+ },
4216
4220
  "DeleteProjectInput": {
4217
4221
  "members": [{"name": "ProjectName", "shape": "ProjectEntityName", "type": "string"}],
4218
4222
  "type": "structure",
@@ -4252,6 +4256,10 @@ SHAPE_DAG = {
4252
4256
  "type": "structure",
4253
4257
  },
4254
4258
  "DeleteTagsOutput": {"members": [], "type": "structure"},
4259
+ "DeleteTrainingJobRequest": {
4260
+ "members": [{"name": "TrainingJobName", "shape": "TrainingJobName", "type": "string"}],
4261
+ "type": "structure",
4262
+ },
4255
4263
  "DeleteTrialComponentRequest": {
4256
4264
  "members": [
4257
4265
  {"name": "TrialComponentName", "shape": "ExperimentEntityName", "type": "string"}
@@ -8365,6 +8373,14 @@ SHAPE_DAG = {
8365
8373
  ],
8366
8374
  "type": "structure",
8367
8375
  },
8376
+ "InferenceComponentDataCacheConfig": {
8377
+ "members": [{"name": "EnableCaching", "shape": "EnableCaching", "type": "boolean"}],
8378
+ "type": "structure",
8379
+ },
8380
+ "InferenceComponentDataCacheConfigSummary": {
8381
+ "members": [{"name": "EnableCaching", "shape": "EnableCaching", "type": "boolean"}],
8382
+ "type": "structure",
8383
+ },
8368
8384
  "InferenceComponentDeploymentConfig": {
8369
8385
  "members": [
8370
8386
  {
@@ -8437,6 +8453,11 @@ SHAPE_DAG = {
8437
8453
  "shape": "InferenceComponentName",
8438
8454
  "type": "string",
8439
8455
  },
8456
+ {
8457
+ "name": "DataCacheConfig",
8458
+ "shape": "InferenceComponentDataCacheConfig",
8459
+ "type": "structure",
8460
+ },
8440
8461
  ],
8441
8462
  "type": "structure",
8442
8463
  },
@@ -8463,6 +8484,11 @@ SHAPE_DAG = {
8463
8484
  "shape": "InferenceComponentName",
8464
8485
  "type": "string",
8465
8486
  },
8487
+ {
8488
+ "name": "DataCacheConfig",
8489
+ "shape": "InferenceComponentDataCacheConfigSummary",
8490
+ "type": "structure",
8491
+ },
8466
8492
  ],
8467
8493
  "type": "structure",
8468
8494
  },
@@ -22677,7 +22677,7 @@ class NotebookInstance(Base):
22677
22677
  default_code_repository: A Git repository to associate with the notebook instance as its default code repository. This can be either the name of a Git repository stored as a resource in your account, or the URL of a Git repository in Amazon Web Services CodeCommit or in any other Git repository. When you open a notebook instance, it opens in the directory that contains this repository. For more information, see Associating Git Repositories with SageMaker AI Notebook Instances.
22678
22678
  additional_code_repositories: An array of up to three Git repositories to associate with the notebook instance. These can be either the names of Git repositories stored as resources in your account, or the URL of Git repositories in Amazon Web Services CodeCommit or in any other Git repository. These repositories are cloned at the same level as the default repository of your notebook instance. For more information, see Associating Git Repositories with SageMaker AI Notebook Instances.
22679
22679
  root_access: Whether root access is enabled or disabled for users of the notebook instance. The default value is Enabled. Lifecycle configurations need root access to be able to set up a notebook instance. Because of this, lifecycle configurations associated with a notebook instance always run with root access even if you disable root access for users.
22680
- platform_identifier: The platform identifier of the notebook instance runtime environment.
22680
+ platform_identifier: The platform identifier of the notebook instance runtime environment. The default value is notebook-al2-v2.
22681
22681
  instance_metadata_service_configuration: Information on the IMDS configuration of the notebook instance
22682
22682
  session: Boto3 session.
22683
22683
  region: Region name.
@@ -26308,6 +26308,40 @@ class ProcessingJob(Base):
26308
26308
  transform(response, "DescribeProcessingJobResponse", self)
26309
26309
  return self
26310
26310
 
26311
+ @Base.add_validate_call
26312
+ def delete(
26313
+ self,
26314
+ ) -> None:
26315
+ """
26316
+ Delete a ProcessingJob resource
26317
+
26318
+ Raises:
26319
+ botocore.exceptions.ClientError: This exception is raised for AWS service related errors.
26320
+ The error message and error code can be parsed from the exception as follows:
26321
+ ```
26322
+ try:
26323
+ # AWS service call here
26324
+ except botocore.exceptions.ClientError as e:
26325
+ error_message = e.response['Error']['Message']
26326
+ error_code = e.response['Error']['Code']
26327
+ ```
26328
+ ResourceInUse: Resource being accessed is in use.
26329
+ ResourceNotFound: Resource being access is not found.
26330
+ """
26331
+
26332
+ client = Base.get_sagemaker_client()
26333
+
26334
+ operation_input_args = {
26335
+ "ProcessingJobName": self.processing_job_name,
26336
+ }
26337
+ # serialize the input request
26338
+ operation_input_args = serialize(operation_input_args)
26339
+ logger.debug(f"Serialized input request: {operation_input_args}")
26340
+
26341
+ client.delete_processing_job(**operation_input_args)
26342
+
26343
+ logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}")
26344
+
26311
26345
  @Base.add_validate_call
26312
26346
  def stop(self) -> None:
26313
26347
  """
@@ -28708,6 +28742,40 @@ class TrainingJob(Base):
28708
28742
 
28709
28743
  return self
28710
28744
 
28745
+ @Base.add_validate_call
28746
+ def delete(
28747
+ self,
28748
+ ) -> None:
28749
+ """
28750
+ Delete a TrainingJob resource
28751
+
28752
+ Raises:
28753
+ botocore.exceptions.ClientError: This exception is raised for AWS service related errors.
28754
+ The error message and error code can be parsed from the exception as follows:
28755
+ ```
28756
+ try:
28757
+ # AWS service call here
28758
+ except botocore.exceptions.ClientError as e:
28759
+ error_message = e.response['Error']['Message']
28760
+ error_code = e.response['Error']['Code']
28761
+ ```
28762
+ ResourceInUse: Resource being accessed is in use.
28763
+ ResourceNotFound: Resource being access is not found.
28764
+ """
28765
+
28766
+ client = Base.get_sagemaker_client()
28767
+
28768
+ operation_input_args = {
28769
+ "TrainingJobName": self.training_job_name,
28770
+ }
28771
+ # serialize the input request
28772
+ operation_input_args = serialize(operation_input_args)
28773
+ logger.debug(f"Serialized input request: {operation_input_args}")
28774
+
28775
+ client.delete_training_job(**operation_input_args)
28776
+
28777
+ logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}")
28778
+
28711
28779
  @Base.add_validate_call
28712
28780
  def stop(self) -> None:
28713
28781
  """
@@ -28822,6 +28890,69 @@ class TrainingJob(Base):
28822
28890
  raise TimeoutExceededError(resouce_type="TrainingJob", status=current_status)
28823
28891
  time.sleep(poll)
28824
28892
 
28893
+ @Base.add_validate_call
28894
+ def wait_for_delete(
28895
+ self,
28896
+ poll: int = 5,
28897
+ timeout: Optional[int] = None,
28898
+ ) -> None:
28899
+ """
28900
+ Wait for a TrainingJob resource to be deleted.
28901
+
28902
+ Parameters:
28903
+ poll: The number of seconds to wait between each poll.
28904
+ timeout: The maximum number of seconds to wait before timing out.
28905
+
28906
+ Raises:
28907
+ botocore.exceptions.ClientError: This exception is raised for AWS service related errors.
28908
+ The error message and error code can be parsed from the exception as follows:
28909
+ ```
28910
+ try:
28911
+ # AWS service call here
28912
+ except botocore.exceptions.ClientError as e:
28913
+ error_message = e.response['Error']['Message']
28914
+ error_code = e.response['Error']['Code']
28915
+ ```
28916
+ TimeoutExceededError: If the resource does not reach a terminal state before the timeout.
28917
+ DeleteFailedStatusError: If the resource reaches a failed state.
28918
+ WaiterError: Raised when an error occurs while waiting.
28919
+ """
28920
+ start_time = time.time()
28921
+
28922
+ progress = Progress(
28923
+ SpinnerColumn("bouncingBar"),
28924
+ TextColumn("{task.description}"),
28925
+ TimeElapsedColumn(),
28926
+ )
28927
+ progress.add_task("Waiting for TrainingJob to be deleted...")
28928
+ status = Status("Current status:")
28929
+
28930
+ with Live(
28931
+ Panel(
28932
+ Group(progress, status),
28933
+ title="Wait Log Panel",
28934
+ border_style=Style(color=Color.BLUE.value),
28935
+ )
28936
+ ):
28937
+ while True:
28938
+ try:
28939
+ self.refresh()
28940
+ current_status = self.training_job_status
28941
+ status.update(f"Current status: [bold]{current_status}")
28942
+
28943
+ if timeout is not None and time.time() - start_time >= timeout:
28944
+ raise TimeoutExceededError(
28945
+ resouce_type="TrainingJob", status=current_status
28946
+ )
28947
+ except botocore.exceptions.ClientError as e:
28948
+ error_code = e.response["Error"]["Code"]
28949
+
28950
+ if "ResourceNotFound" in error_code or "ValidationException" in error_code:
28951
+ logger.info("Resource was not found. It may have been deleted.")
28952
+ return
28953
+ raise e
28954
+ time.sleep(poll)
28955
+
28825
28956
  @classmethod
28826
28957
  @Base.add_validate_call
28827
28958
  def get_all(
@@ -6377,6 +6377,19 @@ class InferenceComponentComputeResourceRequirements(Base):
6377
6377
  max_memory_required_in_mb: Optional[int] = Unassigned()
6378
6378
 
6379
6379
 
6380
+ class InferenceComponentDataCacheConfig(Base):
6381
+ """
6382
+ InferenceComponentDataCacheConfig
6383
+ Settings that affect how the inference component caches data.
6384
+
6385
+ Attributes
6386
+ ----------------------
6387
+ enable_caching: Sets whether the endpoint that hosts the inference component caches the model artifacts and container image. With caching enabled, the endpoint caches this data in each instance that it provisions for the inference component. That way, the inference component deploys faster during the auto scaling process. If caching isn't enabled, the inference component takes longer to deploy because of the time it spends downloading the data.
6388
+ """
6389
+
6390
+ enable_caching: bool
6391
+
6392
+
6380
6393
  class InferenceComponentSpecification(Base):
6381
6394
  """
6382
6395
  InferenceComponentSpecification
@@ -6389,6 +6402,7 @@ class InferenceComponentSpecification(Base):
6389
6402
  startup_parameters: Settings that take effect while the model container starts up.
6390
6403
  compute_resource_requirements: The compute resources allocated to run the model, plus any adapter models, that you assign to the inference component. Omit this parameter if your request is meant to create an adapter inference component. An adapter inference component is loaded by a base inference component, and it uses the compute resources of the base inference component.
6391
6404
  base_inference_component_name: The name of an existing inference component that is to contain the inference component that you're creating with your request. Specify this parameter only if your request is meant to create an adapter inference component. An adapter inference component contains the path to an adapter model. The purpose of the adapter model is to tailor the inference output of a base foundation model, which is hosted by the base inference component. The adapter inference component uses the compute resources that you assigned to the base inference component. When you create an adapter inference component, use the Container parameter to specify the location of the adapter artifacts. In the parameter value, use the ArtifactUrl parameter of the InferenceComponentContainerSpecification data type. Before you can create an adapter inference component, you must have an existing inference component that contains the foundation model that you want to adapt.
6405
+ data_cache_config: Settings that affect how the inference component caches data.
6392
6406
  """
6393
6407
 
6394
6408
  model_name: Optional[Union[str, object]] = Unassigned()
@@ -6398,6 +6412,7 @@ class InferenceComponentSpecification(Base):
6398
6412
  Unassigned()
6399
6413
  )
6400
6414
  base_inference_component_name: Optional[str] = Unassigned()
6415
+ data_cache_config: Optional[InferenceComponentDataCacheConfig] = Unassigned()
6401
6416
 
6402
6417
 
6403
6418
  class InferenceComponentRuntimeConfig(Base):
@@ -7803,7 +7818,7 @@ class ProcessingS3Input(Base):
7803
7818
  local_path: The local path in your container where you want Amazon SageMaker to write input data to. LocalPath is an absolute path to the input data and must begin with /opt/ml/processing/. LocalPath is a required parameter when AppManaged is False (default).
7804
7819
  s3_data_type: Whether you use an S3Prefix or a ManifestFile for the data type. If you choose S3Prefix, S3Uri identifies a key name prefix. Amazon SageMaker uses all objects with the specified key name prefix for the processing job. If you choose ManifestFile, S3Uri identifies an object that is a manifest file containing a list of object keys that you want Amazon SageMaker to use for the processing job.
7805
7820
  s3_input_mode: Whether to use File or Pipe input mode. In File mode, Amazon SageMaker copies the data from the input source onto the local ML storage volume before starting your processing container. This is the most commonly used input mode. In Pipe mode, Amazon SageMaker streams input data from the source directly to your processing container into named pipes without using the ML storage volume.
7806
- s3_data_distribution_type: Whether to distribute the data from Amazon S3 to all processing instances with FullyReplicated, or whether the data from Amazon S3 is shared by Amazon S3 key, downloading one shard of data to each processing instance.
7821
+ s3_data_distribution_type: Whether to distribute the data from Amazon S3 to all processing instances with FullyReplicated, or whether the data from Amazon S3 is sharded by Amazon S3 key, downloading one shard of data to each processing instance.
7807
7822
  s3_compression_type: Whether to GZIP-decompress the data in Amazon S3 as it is streamed into the processing container. Gzip can only be used when Pipe mode is specified as the S3InputMode. In Pipe mode, Amazon SageMaker streams input data from the source directly to your container without using the EBS volume.
7808
7823
  """
7809
7824
 
@@ -9284,6 +9299,19 @@ class InferenceComponentContainerSpecificationSummary(Base):
9284
9299
  environment: Optional[Dict[str, str]] = Unassigned()
9285
9300
 
9286
9301
 
9302
+ class InferenceComponentDataCacheConfigSummary(Base):
9303
+ """
9304
+ InferenceComponentDataCacheConfigSummary
9305
+ Settings that affect how the inference component caches data.
9306
+
9307
+ Attributes
9308
+ ----------------------
9309
+ enable_caching: Indicates whether the inference component caches model artifacts as part of the auto scaling process.
9310
+ """
9311
+
9312
+ enable_caching: bool
9313
+
9314
+
9287
9315
  class InferenceComponentSpecificationSummary(Base):
9288
9316
  """
9289
9317
  InferenceComponentSpecificationSummary
@@ -9296,6 +9324,7 @@ class InferenceComponentSpecificationSummary(Base):
9296
9324
  startup_parameters: Settings that take effect while the model container starts up.
9297
9325
  compute_resource_requirements: The compute resources allocated to run the model, plus any adapter models, that you assign to the inference component.
9298
9326
  base_inference_component_name: The name of the base inference component that contains this inference component.
9327
+ data_cache_config: Settings that affect how the inference component caches data.
9299
9328
  """
9300
9329
 
9301
9330
  model_name: Optional[Union[str, object]] = Unassigned()
@@ -9305,6 +9334,7 @@ class InferenceComponentSpecificationSummary(Base):
9305
9334
  Unassigned()
9306
9335
  )
9307
9336
  base_inference_component_name: Optional[str] = Unassigned()
9337
+ data_cache_config: Optional[InferenceComponentDataCacheConfigSummary] = Unassigned()
9308
9338
 
9309
9339
 
9310
9340
  class InferenceComponentRuntimeConfigSummary(Base):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sagemaker-core
3
- Version: 1.0.59
3
+ Version: 1.0.61
4
4
  Summary: An python package for sagemaker core functionalities
5
5
  Author-email: AWS <sagemaker-interests@amazon.com>
6
6
  Project-URL: Repository, https://github.com/aws/sagemaker-core.git
@@ -7,15 +7,15 @@ sagemaker_core/main/config_schema.py,sha256=1xYzDM0FEBQFmiE3R--Nj0_RMQQF3vxlFQXE
7
7
  sagemaker_core/main/default_configs_helper.py,sha256=bg_tgczX_bYzNiSlalJ6TWPTgrQYsI0uZguP5TIbPiw,8324
8
8
  sagemaker_core/main/exceptions.py,sha256=CsiM3V_Gb16grBotnu59LB6tznryPcSvAQDAOOYGc10,5563
9
9
  sagemaker_core/main/logs.py,sha256=yfEH7uP91nbE1lefymOlBr81ziBzsDSIOF2Qyd54FJE,6241
10
- sagemaker_core/main/resources.py,sha256=9WrqWlZv-FTfTM679NhX5cSyupF69lpqMO1J5SBzpsY,1445449
11
- sagemaker_core/main/shapes.py,sha256=2yq1KiTlVFTnaxng38_geO3wk1snjpTdel8M7fZ16fw,789055
10
+ sagemaker_core/main/resources.py,sha256=rGUGdaFbj0k0jMaYmqv7pFXR7kO73LE8i0k4FRwpu28,1450476
11
+ sagemaker_core/main/shapes.py,sha256=zYSg0Y41FJIYRfWYcuekcAS8qDyr2SA3hWeFmDDQFro,790466
12
12
  sagemaker_core/main/user_agent.py,sha256=BPYDAfDd70ObP-VAjl7aDHALHyGknkpRP21ktVr_LDw,2744
13
13
  sagemaker_core/main/utils.py,sha256=y1aZzztCApczZSqT0U7_H8zLlpqp1vgoUKcp40mTM2o,19157
14
14
  sagemaker_core/main/code_injection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
15
  sagemaker_core/main/code_injection/base.py,sha256=11_Jif0nOzfbLGlXaacKf-wcizzfS64U0OSZGoVffFU,1733
16
16
  sagemaker_core/main/code_injection/codec.py,sha256=2YzJ-iYEzmguVaJVcZeyCR0OpTSR7UOixATrOm4MiBk,8885
17
17
  sagemaker_core/main/code_injection/constants.py,sha256=2ICExGge8vAWx7lSTW0JGh-bH1korkvpOpDu5M63eI4,980
18
- sagemaker_core/main/code_injection/shape_dag.py,sha256=rq8Y0IxIjupoHdmSFUojNh2HN-4voYEGi-0jZvYBEzA,748502
18
+ sagemaker_core/main/code_injection/shape_dag.py,sha256=OpcqoAYrZqj1UQTC9zMswN6yHNBE1wERgMb8lxGdnIA,749540
19
19
  sagemaker_core/resources/__init__.py,sha256=EAYTFMN-nPjnPjjBbhIUeaL67FLKNPd7qbcbl9VIrws,31
20
20
  sagemaker_core/shapes/__init__.py,sha256=RnbIu9eTxKt-DNsOFJabrWIgrrtS9_SdAozP9JBl_ic,28
21
21
  sagemaker_core/tools/__init__.py,sha256=xX79JImxCVzrWMnjgntLCve2G5I-R4pRar5s20kT9Rs,56
@@ -28,8 +28,8 @@ sagemaker_core/tools/resources_extractor.py,sha256=hN61ehZbPnhFW-2FIVDi7NsEz4rLv
28
28
  sagemaker_core/tools/shapes_codegen.py,sha256=4lsePZpjk7M6RpJs5yar_m4z5MzwGHFrvCkdS_-R12c,12172
29
29
  sagemaker_core/tools/shapes_extractor.py,sha256=vxVKjXD3lmjrkoKiexjUnOt8ITbFxQSeiDtx7P6Qtkw,14226
30
30
  sagemaker_core/tools/templates.py,sha256=0lOIH3Rq2CXWkQhK6VenN_TE_v5p852s2kQyb_BeQxA,23460
31
- sagemaker_core-1.0.59.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
32
- sagemaker_core-1.0.59.dist-info/METADATA,sha256=1CK1kbzhY9LrdP0fw0sFAlFEEL_nV3A4oQH8vHonKf4,4871
33
- sagemaker_core-1.0.59.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
34
- sagemaker_core-1.0.59.dist-info/top_level.txt,sha256=R3GAZZ1zC5JxqdE_0x2Lu_WYi2Xfke7VsiP3L5zngfA,15
35
- sagemaker_core-1.0.59.dist-info/RECORD,,
31
+ sagemaker_core-1.0.61.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
32
+ sagemaker_core-1.0.61.dist-info/METADATA,sha256=IVqhfrvHAoF1JkY_i682zCGoCKRzLPfTxuELnMSlgv4,4871
33
+ sagemaker_core-1.0.61.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
34
+ sagemaker_core-1.0.61.dist-info/top_level.txt,sha256=R3GAZZ1zC5JxqdE_0x2Lu_WYi2Xfke7VsiP3L5zngfA,15
35
+ sagemaker_core-1.0.61.dist-info/RECORD,,