diff --git a/docs/conf.py b/docs/conf.py index 06a2ecb2..c509040c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -9,8 +9,7 @@ project = "sagemaker-core" copyright = ( - "%s, Amazon Web Services, Inc. or its affiliates. All rights reserved." - % datetime.now().year + "%s, Amazon Web Services, Inc. or its affiliates. All rights reserved." % datetime.now().year ) author = "Amazon Web Services" @@ -65,4 +64,3 @@ # autosectionlabel autosectionlabel_prefix_document = True - diff --git a/src/sagemaker_core/main/resources.py b/src/sagemaker_core/main/resources.py index ee7fa919..f7e23be7 100644 --- a/src/sagemaker_core/main/resources.py +++ b/src/sagemaker_core/main/resources.py @@ -305,6 +305,10 @@ def get( operation_input_args = { "ActionName": action_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -343,6 +347,10 @@ def refresh( operation_input_args = { "ActionName": self.action_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_action(**operation_input_args) @@ -428,6 +436,10 @@ def delete( operation_input_args = { "ActionName": self.action_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_action(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -489,11 +501,9 @@ def get_all( "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -684,6 +694,10 @@ def get( operation_input_args = { "AlgorithmName": algorithm_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -721,6 +735,10 @@ def refresh( operation_input_args = { "AlgorithmName": self.algorithm_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_algorithm(**operation_input_args) @@ -753,6 +771,10 @@ def delete( operation_input_args = { "AlgorithmName": self.algorithm_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_algorithm(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -926,11 +948,9 @@ def get_all( "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -1122,6 +1142,10 @@ def get( "AppType": app_type, "AppName": app_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -1164,6 +1188,10 @@ def refresh( "AppType": self.app_type, "AppName": self.app_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_app(**operation_input_args) @@ -1201,6 +1229,10 @@ def delete( "AppType": self.app_type, "AppName": self.app_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_app(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -1378,11 +1410,9 @@ def get_all( "SpaceNameEquals": space_name_equals, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -1539,6 +1569,10 @@ def get( operation_input_args = { "AppImageConfigName": app_image_config_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -1577,6 +1611,10 @@ def refresh( operation_input_args = { "AppImageConfigName": self.app_image_config_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_app_image_config(**operation_input_args) @@ -1656,6 +1694,10 @@ def delete( operation_input_args = { "AppImageConfigName": self.app_image_config_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_app_image_config(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -1719,11 +1761,9 @@ def get_all( "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -1891,6 +1931,10 @@ def get( operation_input_args = { "ArtifactArn": artifact_arn, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -1929,6 +1973,10 @@ def refresh( operation_input_args = { "ArtifactArn": self.artifact_arn, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_artifact(**operation_input_args) @@ -2013,6 +2061,10 @@ def delete( "ArtifactArn": self.artifact_arn, "Source": self.source, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_artifact(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -2074,11 +2126,9 @@ def get_all( "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -2159,6 +2209,10 @@ def delete( "SourceArn": self.source_arn, "DestinationArn": self.destination_arn, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_association(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -2229,11 +2283,9 @@ def get_all( "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -2283,7 +2335,9 @@ def add( "DestinationArn": destination_arn, "AssociationType": association_type, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -2515,6 +2569,10 @@ def get( operation_input_args = { "AutoMLJobName": auto_ml_job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -2553,6 +2611,10 @@ def refresh( operation_input_args = { "AutoMLJobName": self.auto_ml_job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_auto_ml_job(**operation_input_args) @@ -2583,6 +2645,10 @@ def stop(self) -> None: operation_input_args = { "AutoMLJobName": self.auto_ml_job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.stop_auto_ml_job(**operation_input_args) logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") @@ -2703,11 +2769,9 @@ def get_all( "SortBy": sort_by, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -2764,12 +2828,9 @@ def get_all_candidates( "SortOrder": sort_order, "SortBy": sort_by, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -3017,6 +3078,10 @@ def get( operation_input_args = { "AutoMLJobName": auto_ml_job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -3055,6 +3120,10 @@ def refresh( operation_input_args = { "AutoMLJobName": self.auto_ml_job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_auto_ml_job_v2(**operation_input_args) @@ -3279,6 +3348,10 @@ def get( operation_input_args = { "ClusterName": cluster_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -3317,6 +3390,10 @@ def refresh( operation_input_args = { "ClusterName": self.cluster_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_cluster(**operation_input_args) @@ -3396,6 +3473,10 @@ def delete( operation_input_args = { "ClusterName": self.cluster_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_cluster(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -3577,11 +3658,9 @@ def get_all( "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -3627,7 +3706,9 @@ def get_node( "ClusterName": self.cluster_name, "NodeId": node_id, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -3689,12 +3770,9 @@ def get_all_nodes( "SortBy": sort_by, "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -3739,7 +3817,9 @@ def update_software( operation_input_args = { "ClusterName": self.cluster_name, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -3883,6 +3963,10 @@ def get( operation_input_args = { "CodeRepositoryName": code_repository_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -3920,6 +4004,10 @@ def refresh( operation_input_args = { "CodeRepositoryName": self.code_repository_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_code_repository(**operation_input_args) @@ -3994,6 +4082,10 @@ def delete( operation_input_args = { "CodeRepositoryName": self.code_repository_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_code_repository(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -4052,12 +4144,9 @@ def get_all( "SortBy": sort_by, "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -4276,6 +4365,10 @@ def get( operation_input_args = { "CompilationJobName": compilation_job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -4314,6 +4407,10 @@ def refresh( operation_input_args = { "CompilationJobName": self.compilation_job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_compilation_job(**operation_input_args) @@ -4346,6 +4443,10 @@ def delete( operation_input_args = { "CompilationJobName": self.compilation_job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_compilation_job(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -4373,6 +4474,10 @@ def stop(self) -> None: operation_input_args = { "CompilationJobName": self.compilation_job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.stop_compilation_job(**operation_input_args) logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") @@ -4493,11 +4598,9 @@ def get_all( "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -4665,6 +4768,10 @@ def get( operation_input_args = { "ContextName": context_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -4703,6 +4810,10 @@ def refresh( operation_input_args = { "ContextName": self.context_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_context(**operation_input_args) @@ -4786,6 +4897,10 @@ def delete( operation_input_args = { "ContextName": self.context_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_context(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -4847,11 +4962,9 @@ def get_all( "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -5071,6 +5184,10 @@ def get( operation_input_args = { "JobDefinitionName": job_definition_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -5109,6 +5226,10 @@ def refresh( operation_input_args = { "JobDefinitionName": self.job_definition_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_data_quality_job_definition(**operation_input_args) @@ -5141,6 +5262,10 @@ def delete( operation_input_args = { "JobDefinitionName": self.job_definition_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_data_quality_job_definition(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -5204,11 +5329,9 @@ def get_all( "monitoring_job_definition_name": "job_definition_name", "monitoring_job_definition_arn": "job_definition_arn", } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -5309,6 +5432,10 @@ def get( "DeviceName": device_name, "DeviceFleetName": device_fleet_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -5349,6 +5476,10 @@ def refresh( "DeviceName": self.device_name, "DeviceFleetName": self.device_fleet_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_device(**operation_input_args) @@ -5403,11 +5534,9 @@ def get_all( "DeviceFleetName": device_fleet_name, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -5591,6 +5720,10 @@ def get( operation_input_args = { "DeviceFleetName": device_fleet_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -5629,6 +5762,10 @@ def refresh( operation_input_args = { "DeviceFleetName": self.device_fleet_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_device_fleet(**operation_input_args) @@ -5714,6 +5851,10 @@ def delete( operation_input_args = { "DeviceFleetName": self.device_fleet_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_device_fleet(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -5777,11 +5918,9 @@ def get_all( "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -5823,7 +5962,9 @@ def deregister_devices( "DeviceFleetName": self.device_fleet_name, "DeviceNames": device_names, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -5864,7 +6005,9 @@ def get_report( operation_input_args = { "DeviceFleetName": self.device_fleet_name, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -5912,7 +6055,9 @@ def register_devices( "Devices": devices, "Tags": tags, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -5953,7 +6098,9 @@ def update_devices( "DeviceFleetName": self.device_fleet_name, "Devices": devices, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -6226,6 +6373,10 @@ def get( operation_input_args = { "DomainId": domain_id, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -6264,6 +6415,10 @@ def refresh( operation_input_args = { "DomainId": self.domain_id, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_domain(**operation_input_args) @@ -6358,6 +6513,10 @@ def delete( "DomainId": self.domain_id, "RetentionPolicy": retention_policy, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_domain(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -6686,6 +6845,10 @@ def get( "NextToken": next_token, "MaxResults": max_results, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -6727,6 +6890,10 @@ def refresh( "NextToken": self.next_token, "MaxResults": max_results, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_edge_deployment_plan(**operation_input_args) @@ -6759,6 +6926,10 @@ def delete( operation_input_args = { "EdgeDeploymentPlanName": self.edge_deployment_plan_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_edge_deployment_plan(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -6825,11 +6996,9 @@ def get_all( "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -6870,7 +7039,9 @@ def create_stage( "EdgeDeploymentPlanName": self.edge_deployment_plan_name, "Stages": self.stages, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -6912,7 +7083,9 @@ def delete_stage( "EdgeDeploymentPlanName": self.edge_deployment_plan_name, "StageName": stage_name, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -6953,7 +7126,9 @@ def start_stage( "EdgeDeploymentPlanName": self.edge_deployment_plan_name, "StageName": stage_name, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -6994,7 +7169,9 @@ def stop_stage( "EdgeDeploymentPlanName": self.edge_deployment_plan_name, "StageName": stage_name, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -7042,12 +7219,9 @@ def get_all_stage_devices( "ExcludeDevicesDeployedInOtherStage": exclude_devices_deployed_in_other_stage, "StageName": stage_name, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -7255,6 +7429,10 @@ def get( operation_input_args = { "EdgePackagingJobName": edge_packaging_job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -7293,6 +7471,10 @@ def refresh( operation_input_args = { "EdgePackagingJobName": self.edge_packaging_job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_edge_packaging_job(**operation_input_args) @@ -7322,6 +7504,10 @@ def stop(self) -> None: operation_input_args = { "EdgePackagingJobName": self.edge_packaging_job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.stop_edge_packaging_job(**operation_input_args) logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") @@ -7447,11 +7633,9 @@ def get_all( "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -7644,6 +7828,10 @@ def get( operation_input_args = { "EndpointName": endpoint_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -7681,6 +7869,10 @@ def refresh( operation_input_args = { "EndpointName": self.endpoint_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_endpoint(**operation_input_args) @@ -7769,6 +7961,10 @@ def delete( operation_input_args = { "EndpointName": self.endpoint_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_endpoint(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -8173,11 +8369,9 @@ def get_all( "StatusEquals": status_equals, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -8220,7 +8414,9 @@ def update_weights_and_capacities( "EndpointName": self.endpoint_name, "DesiredWeightsAndCapacities": desired_weights_and_capacities, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -8435,6 +8631,10 @@ def get( operation_input_args = { "EndpointConfigName": endpoint_config_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -8472,6 +8672,10 @@ def refresh( operation_input_args = { "EndpointConfigName": self.endpoint_config_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_endpoint_config(**operation_input_args) @@ -8503,6 +8707,10 @@ def delete( operation_input_args = { "EndpointConfigName": self.endpoint_config_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_endpoint_config(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -8560,11 +8768,9 @@ def get_all( "CreationTimeAfter": creation_time_after, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -8722,6 +8928,10 @@ def get( operation_input_args = { "ExperimentName": experiment_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -8760,6 +8970,10 @@ def refresh( operation_input_args = { "ExperimentName": self.experiment_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_experiment(**operation_input_args) @@ -8838,6 +9052,10 @@ def delete( operation_input_args = { "ExperimentName": self.experiment_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_experiment(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -8892,11 +9110,9 @@ def get_all( "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -9118,6 +9334,10 @@ def get( "FeatureGroupName": feature_group_name, "NextToken": next_token, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -9157,6 +9377,10 @@ def refresh( "FeatureGroupName": self.feature_group_name, "NextToken": self.next_token, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_feature_group(**operation_input_args) @@ -9241,6 +9465,10 @@ def delete( operation_input_args = { "FeatureGroupName": self.feature_group_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_feature_group(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -9424,11 +9652,9 @@ def get_all( "SortBy": sort_by, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -9519,6 +9745,10 @@ def get( "FeatureGroupName": feature_group_name, "FeatureName": feature_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -9558,6 +9788,10 @@ def refresh( "FeatureGroupName": self.feature_group_name, "FeatureName": self.feature_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_feature_metadata(**operation_input_args) @@ -9796,6 +10030,10 @@ def get( operation_input_args = { "FlowDefinitionName": flow_definition_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -9834,6 +10072,10 @@ def refresh( operation_input_args = { "FlowDefinitionName": self.flow_definition_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_flow_definition(**operation_input_args) @@ -9867,6 +10109,10 @@ def delete( operation_input_args = { "FlowDefinitionName": self.flow_definition_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_flow_definition(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -10038,11 +10284,9 @@ def get_all( "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -10225,6 +10469,10 @@ def get( operation_input_args = { "HubName": hub_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -10263,6 +10511,10 @@ def refresh( operation_input_args = { "HubName": self.hub_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_hub(**operation_input_args) @@ -10344,6 +10596,10 @@ def delete( operation_input_args = { "HubName": self.hub_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_hub(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -10531,11 +10787,9 @@ def get_all( "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -10654,6 +10908,10 @@ def get( "HubContentName": hub_content_name, "HubContentVersion": hub_content_version, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -10695,6 +10953,10 @@ def refresh( "HubContentName": self.hub_content_name, "HubContentVersion": self.hub_content_version, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_hub_content(**operation_input_args) @@ -10731,6 +10993,10 @@ def delete( "HubContentName": self.hub_content_name, "HubContentVersion": self.hub_content_version, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_hub_content(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -10929,12 +11195,9 @@ def get_all_versions( "SortBy": sort_by, "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -11039,7 +11302,9 @@ def create( "MinVersion": min_version, "Tags": tags, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -11080,6 +11345,10 @@ def delete( "HubContentType": hub_content_type, "HubContentName": self.hub_content_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_hub_content_reference(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -11221,6 +11490,10 @@ def get( operation_input_args = { "HumanTaskUiName": human_task_ui_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -11259,6 +11532,10 @@ def refresh( operation_input_args = { "HumanTaskUiName": self.human_task_ui_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_human_task_ui(**operation_input_args) @@ -11291,6 +11568,10 @@ def delete( operation_input_args = { "HumanTaskUiName": self.human_task_ui_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_human_task_ui(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -11455,11 +11736,9 @@ def get_all( "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -11682,6 +11961,10 @@ def get( operation_input_args = { "HyperParameterTuningJobName": hyper_parameter_tuning_job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -11720,6 +12003,10 @@ def refresh( operation_input_args = { "HyperParameterTuningJobName": self.hyper_parameter_tuning_job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_hyper_parameter_tuning_job(**operation_input_args) @@ -11751,6 +12038,10 @@ def delete( operation_input_args = { "HyperParameterTuningJobName": self.hyper_parameter_tuning_job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_hyper_parameter_tuning_job(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -11778,6 +12069,10 @@ def stop(self) -> None: operation_input_args = { "HyperParameterTuningJobName": self.hyper_parameter_tuning_job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.stop_hyper_parameter_tuning_job(**operation_input_args) logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") @@ -11963,11 +12258,9 @@ def get_all( "StatusEquals": status_equals, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -12021,12 +12314,9 @@ def get_all_training_jobs( "SortBy": sort_by, "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -12206,6 +12496,10 @@ def get( operation_input_args = { "ImageName": image_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -12244,6 +12538,10 @@ def refresh( operation_input_args = { "ImageName": self.image_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_image(**operation_input_args) @@ -12331,6 +12629,10 @@ def delete( operation_input_args = { "ImageName": self.image_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_image(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -12526,11 +12828,9 @@ def get_all( "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -12581,12 +12881,9 @@ def get_all_aliases( "Alias": alias, "Version": version, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -12792,6 +13089,10 @@ def get( "Version": version, "Alias": alias, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -12833,6 +13134,10 @@ def refresh( "Version": self.version, "Alias": alias, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_image_version(**operation_input_args) @@ -12938,6 +13243,10 @@ def delete( "Version": self.version, "Alias": alias, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_image_version(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -13228,6 +13537,10 @@ def get( operation_input_args = { "InferenceComponentName": inference_component_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -13265,6 +13578,10 @@ def refresh( operation_input_args = { "InferenceComponentName": self.inference_component_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_inference_component(**operation_input_args) @@ -13341,6 +13658,10 @@ def delete( operation_input_args = { "InferenceComponentName": self.inference_component_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_inference_component(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -13537,11 +13858,9 @@ def get_all( "VariantNameEquals": variant_name_equals, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -13584,7 +13903,9 @@ def update_runtime_configs( "InferenceComponentName": self.inference_component_name, "DesiredRuntimeConfig": desired_runtime_config, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -13795,6 +14116,10 @@ def get( operation_input_args = { "Name": name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -13833,6 +14158,10 @@ def refresh( operation_input_args = { "Name": self.name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_inference_experiment(**operation_input_args) @@ -13919,6 +14248,10 @@ def delete( operation_input_args = { "Name": self.name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_inference_experiment(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -13951,6 +14284,10 @@ def stop(self) -> None: "DesiredState": self.desired_state, "Reason": self.reason, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.stop_inference_experiment(**operation_input_args) logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") @@ -14083,11 +14420,9 @@ def get_all( "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -14291,6 +14626,10 @@ def get( operation_input_args = { "JobName": job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -14329,6 +14668,10 @@ def refresh( operation_input_args = { "JobName": self.job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_inference_recommendations_job(**operation_input_args) @@ -14359,6 +14702,10 @@ def stop(self) -> None: operation_input_args = { "JobName": self.job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.stop_inference_recommendations_job(**operation_input_args) logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") @@ -14554,11 +14901,9 @@ def get_all( "ModelPackageVersionArnEquals": model_package_version_arn_equals, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -14607,12 +14952,9 @@ def get_all_steps( "Status": self.status, "StepType": step_type, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -14846,6 +15188,10 @@ def get( operation_input_args = { "LabelingJobName": labeling_job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -14884,6 +15230,10 @@ def refresh( operation_input_args = { "LabelingJobName": self.labeling_job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_labeling_job(**operation_input_args) @@ -14914,6 +15264,10 @@ def stop(self) -> None: operation_input_args = { "LabelingJobName": self.labeling_job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.stop_labeling_job(**operation_input_args) logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") @@ -15034,11 +15388,9 @@ def get_all( "StatusEquals": status_equals, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -15126,6 +15478,10 @@ def get( operation_input_args = { "LineageGroupName": lineage_group_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -15164,6 +15520,10 @@ def refresh( operation_input_args = { "LineageGroupName": self.lineage_group_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_lineage_group(**operation_input_args) @@ -15221,11 +15581,9 @@ def get_all( "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -15268,7 +15626,9 @@ def get_policy( operation_input_args = { "LineageGroupName": self.lineage_group_name, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -15466,6 +15826,10 @@ def get( operation_input_args = { "TrackingServerName": tracking_server_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -15504,6 +15868,10 @@ def refresh( operation_input_args = { "TrackingServerName": self.tracking_server_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_mlflow_tracking_server(**operation_input_args) @@ -15588,6 +15956,10 @@ def delete( operation_input_args = { "TrackingServerName": self.tracking_server_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_mlflow_tracking_server(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -15616,6 +15988,10 @@ def stop(self) -> None: operation_input_args = { "TrackingServerName": self.tracking_server_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.stop_mlflow_tracking_server(**operation_input_args) logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") @@ -15818,11 +16194,9 @@ def get_all( "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -16021,6 +16395,10 @@ def get( operation_input_args = { "ModelName": model_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -16058,6 +16436,10 @@ def refresh( operation_input_args = { "ModelName": self.model_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_model(**operation_input_args) @@ -16089,6 +16471,10 @@ def delete( operation_input_args = { "ModelName": self.model_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_model(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -16146,11 +16532,9 @@ def get_all( "CreationTimeAfter": creation_time_after, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -16196,12 +16580,9 @@ def get_all_metadata( operation_input_args = { "SearchExpression": search_expression, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -16425,6 +16806,10 @@ def get( operation_input_args = { "JobDefinitionName": job_definition_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -16463,6 +16848,10 @@ def refresh( operation_input_args = { "JobDefinitionName": self.job_definition_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_model_bias_job_definition(**operation_input_args) @@ -16495,6 +16884,10 @@ def delete( operation_input_args = { "JobDefinitionName": self.job_definition_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_model_bias_job_definition(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -16558,11 +16951,9 @@ def get_all( "monitoring_job_definition_name": "job_definition_name", "monitoring_job_definition_arn": "job_definition_arn", } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -16746,6 +17137,10 @@ def get( "ModelCardName": model_card_name, "ModelCardVersion": model_card_version, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -16785,6 +17180,10 @@ def refresh( "ModelCardName": self.model_card_name, "ModelCardVersion": self.model_card_version, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_model_card(**operation_input_args) @@ -16866,6 +17265,10 @@ def delete( operation_input_args = { "ModelCardName": self.model_card_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_model_card(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -16976,11 +17379,9 @@ def get_all( "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -17038,12 +17439,9 @@ def get_all_versions( "SortBy": sort_by, "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -17230,6 +17628,10 @@ def get( operation_input_args = { "ModelCardExportJobArn": model_card_export_job_arn, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -17268,6 +17670,10 @@ def refresh( operation_input_args = { "ModelCardExportJobArn": self.model_card_export_job_arn, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_model_card_export_job(**operation_input_args) @@ -17393,11 +17799,9 @@ def get_all( "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -17621,6 +18025,10 @@ def get( operation_input_args = { "JobDefinitionName": job_definition_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -17661,6 +18069,10 @@ def refresh( operation_input_args = { "JobDefinitionName": self.job_definition_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_model_explainability_job_definition(**operation_input_args) @@ -17693,6 +18105,10 @@ def delete( operation_input_args = { "JobDefinitionName": self.job_definition_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_model_explainability_job_definition(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -17756,11 +18172,9 @@ def get_all( "monitoring_job_definition_name": "job_definition_name", "monitoring_job_definition_arn": "job_definition_arn", } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -18071,6 +18485,10 @@ def get( operation_input_args = { "ModelPackageName": model_package_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -18108,6 +18526,10 @@ def refresh( operation_input_args = { "ModelPackageName": self.model_package_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_model_package(**operation_input_args) @@ -18204,6 +18626,10 @@ def delete( operation_input_args = { "ModelPackageName": self.model_package_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_model_package(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -18388,11 +18814,9 @@ def get_all( "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -18436,7 +18860,9 @@ def batch_get( operation_input_args = { "ModelPackageArnList": model_package_arn_list, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -18588,6 +19014,10 @@ def get( operation_input_args = { "ModelPackageGroupName": model_package_group_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -18625,6 +19055,10 @@ def refresh( operation_input_args = { "ModelPackageGroupName": self.model_package_group_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_model_package_group(**operation_input_args) @@ -18657,6 +19091,10 @@ def delete( operation_input_args = { "ModelPackageGroupName": self.model_package_group_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_model_package_group(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -18839,11 +19277,9 @@ def get_all( "CrossAccountFilterOption": cross_account_filter_option, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -18885,7 +19321,9 @@ def get_policy( operation_input_args = { "ModelPackageGroupName": self.model_package_group_name, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -18925,7 +19363,9 @@ def delete_policy( operation_input_args = { "ModelPackageGroupName": self.model_package_group_name, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -18967,7 +19407,9 @@ def put_policy( "ModelPackageGroupName": self.model_package_group_name, "ResourcePolicy": resource_policy, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -19186,6 +19628,10 @@ def get( operation_input_args = { "JobDefinitionName": job_definition_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -19224,6 +19670,10 @@ def refresh( operation_input_args = { "JobDefinitionName": self.job_definition_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_model_quality_job_definition(**operation_input_args) @@ -19256,6 +19706,10 @@ def delete( operation_input_args = { "JobDefinitionName": self.job_definition_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_model_quality_job_definition(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -19319,11 +19773,9 @@ def get_all( "monitoring_job_definition_name": "job_definition_name", "monitoring_job_definition_arn": "job_definition_arn", } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -19468,11 +19920,9 @@ def get_all( "MonitoringScheduleName": monitoring_schedule_name, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -19539,7 +19989,9 @@ def list_history( "CreationTimeAfter": creation_time_after, "StatusEquals": status_equals, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -19675,11 +20127,9 @@ def get_all( "MonitoringTypeEquals": monitoring_type_equals, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -19876,6 +20326,10 @@ def get( operation_input_args = { "MonitoringScheduleName": monitoring_schedule_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -19914,6 +20368,10 @@ def refresh( operation_input_args = { "MonitoringScheduleName": self.monitoring_schedule_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_monitoring_schedule(**operation_input_args) @@ -19991,6 +20449,10 @@ def delete( operation_input_args = { "MonitoringScheduleName": self.monitoring_schedule_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_monitoring_schedule(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -20018,6 +20480,10 @@ def stop(self) -> None: operation_input_args = { "MonitoringScheduleName": self.monitoring_schedule_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.stop_monitoring_schedule(**operation_input_args) logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") @@ -20154,11 +20620,9 @@ def get_all( "MonitoringTypeEquals": monitoring_type_equals, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -20402,6 +20866,10 @@ def get( operation_input_args = { "NotebookInstanceName": notebook_instance_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -20439,6 +20907,10 @@ def refresh( operation_input_args = { "NotebookInstanceName": self.notebook_instance_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_notebook_instance(**operation_input_args) @@ -20547,6 +21019,10 @@ def delete( operation_input_args = { "NotebookInstanceName": self.notebook_instance_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_notebook_instance(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -20573,6 +21049,10 @@ def stop(self) -> None: operation_input_args = { "NotebookInstanceName": self.notebook_instance_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.stop_notebook_instance(**operation_input_args) logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") @@ -20772,11 +21252,9 @@ def get_all( "AdditionalCodeRepositoryEquals": additional_code_repository_equals, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -20929,6 +21407,10 @@ def get( operation_input_args = { "NotebookInstanceLifecycleConfigName": notebook_instance_lifecycle_config_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -20966,6 +21448,10 @@ def refresh( operation_input_args = { "NotebookInstanceLifecycleConfigName": self.notebook_instance_lifecycle_config_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_notebook_instance_lifecycle_config(**operation_input_args) @@ -21042,6 +21528,10 @@ def delete( operation_input_args = { "NotebookInstanceLifecycleConfigName": self.notebook_instance_lifecycle_config_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_notebook_instance_lifecycle_config(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -21105,11 +21595,9 @@ def get_all( "LastModifiedTimeAfter": last_modified_time_after, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -21327,6 +21815,10 @@ def get( operation_input_args = { "OptimizationJobName": optimization_job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -21365,6 +21857,10 @@ def refresh( operation_input_args = { "OptimizationJobName": self.optimization_job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_optimization_job(**operation_input_args) @@ -21397,6 +21893,10 @@ def delete( operation_input_args = { "OptimizationJobName": self.optimization_job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_optimization_job(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -21424,6 +21924,10 @@ def stop(self) -> None: operation_input_args = { "OptimizationJobName": self.optimization_job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.stop_optimization_job(**operation_input_args) logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") @@ -21549,11 +22053,9 @@ def get_all( "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -21750,6 +22252,10 @@ def get( operation_input_args = { "PipelineName": pipeline_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -21788,6 +22294,10 @@ def refresh( operation_input_args = { "PipelineName": self.pipeline_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_pipeline(**operation_input_args) @@ -21881,6 +22391,10 @@ def delete( "PipelineName": self.pipeline_name, "ClientRequestToken": client_request_token, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_pipeline(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -22049,11 +22563,9 @@ def get_all( "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -22151,6 +22663,10 @@ def get( operation_input_args = { "PipelineExecutionArn": pipeline_execution_arn, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -22189,6 +22705,10 @@ def refresh( operation_input_args = { "PipelineExecutionArn": self.pipeline_execution_arn, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_pipeline_execution(**operation_input_args) @@ -22269,6 +22789,10 @@ def stop(self) -> None: "PipelineExecutionArn": self.pipeline_execution_arn, "ClientRequestToken": self.client_request_token, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.stop_pipeline_execution(**operation_input_args) logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") @@ -22386,11 +22910,9 @@ def get_all( "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -22433,7 +22955,9 @@ def get_pipeline_definition( operation_input_args = { "PipelineExecutionArn": self.pipeline_execution_arn, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -22483,12 +23007,9 @@ def get_all_steps( "PipelineExecutionArn": self.pipeline_execution_arn, "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -22537,12 +23058,9 @@ def get_all_parameters( operation_input_args = { "PipelineExecutionArn": self.pipeline_execution_arn, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -22592,7 +23110,9 @@ def retry( "ClientRequestToken": client_request_token, "ParallelismConfiguration": self.parallelism_configuration, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -22639,7 +23159,9 @@ def send_execution_step_failure( "FailureReason": self.failure_reason, "ClientRequestToken": client_request_token, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -22688,7 +23210,9 @@ def send_execution_step_success( "OutputParameters": output_parameters, "ClientRequestToken": client_request_token, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -22789,7 +23313,9 @@ def create( "SpaceName": space_name, "LandingUri": landing_uri, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -22878,7 +23404,9 @@ def create( "ExpiresInSeconds": expires_in_seconds, "SessionExpirationDurationInSeconds": session_expiration_duration_in_seconds, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -22961,7 +23489,9 @@ def create( "NotebookInstanceName": notebook_instance_name, "SessionExpirationDurationInSeconds": session_expiration_duration_in_seconds, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -23194,6 +23724,10 @@ def get( operation_input_args = { "ProcessingJobName": processing_job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -23232,6 +23766,10 @@ def refresh( operation_input_args = { "ProcessingJobName": self.processing_job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_processing_job(**operation_input_args) @@ -23262,6 +23800,10 @@ def stop(self) -> None: operation_input_args = { "ProcessingJobName": self.processing_job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.stop_processing_job(**operation_input_args) logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") @@ -23382,11 +23924,9 @@ def get_all( "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -23549,6 +24089,10 @@ def get( operation_input_args = { "ProjectName": project_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -23586,6 +24130,10 @@ def refresh( operation_input_args = { "ProjectName": self.project_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_project(**operation_input_args) @@ -23671,6 +24219,10 @@ def delete( operation_input_args = { "ProjectName": self.project_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_project(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -23794,11 +24346,9 @@ def get_all( "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -23896,11 +24446,9 @@ def get_all( "SortBy": sort_by, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -24190,6 +24738,10 @@ def get( "DomainId": domain_id, "SpaceName": space_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -24229,6 +24781,10 @@ def refresh( "DomainId": self.domain_id, "SpaceName": self.space_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_space(**operation_input_args) @@ -24311,6 +24867,10 @@ def delete( "DomainId": self.domain_id, "SpaceName": self.space_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_space(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -24497,11 +25057,9 @@ def get_all( "SpaceNameContains": space_name_contains, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -24657,6 +25215,10 @@ def get( operation_input_args = { "StudioLifecycleConfigName": studio_lifecycle_config_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -24695,6 +25257,10 @@ def refresh( operation_input_args = { "StudioLifecycleConfigName": self.studio_lifecycle_config_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_studio_lifecycle_config(**operation_input_args) @@ -24728,6 +25294,10 @@ def delete( operation_input_args = { "StudioLifecycleConfigName": self.studio_lifecycle_config_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_studio_lifecycle_config(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -24795,11 +25365,9 @@ def get_all( "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -24873,6 +25441,10 @@ def get( operation_input_args = { "WorkteamArn": workteam_arn, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -24910,6 +25482,10 @@ def refresh( operation_input_args = { "WorkteamArn": self.workteam_arn, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_subscribed_workteam(**operation_input_args) @@ -24958,11 +25534,9 @@ def get_all( "NameContains": name_contains, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -25044,11 +25618,9 @@ def get_all( "ResourceArn": resource_arn, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -25093,7 +25665,9 @@ def add_tags( "ResourceArn": resource_arn, "Tags": tags, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -25137,7 +25711,9 @@ def delete_tags( "ResourceArn": resource_arn, "TagKeys": tag_keys, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -25457,6 +26033,10 @@ def get( operation_input_args = { "TrainingJobName": training_job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -25495,6 +26075,10 @@ def refresh( operation_input_args = { "TrainingJobName": self.training_job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_training_job(**operation_input_args) @@ -25576,6 +26160,10 @@ def stop(self) -> None: operation_input_args = { "TrainingJobName": self.training_job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.stop_training_job(**operation_input_args) logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") @@ -25699,11 +26287,9 @@ def get_all( "WarmPoolStatusEquals": warm_pool_status_equals, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -25949,6 +26535,10 @@ def get( operation_input_args = { "TransformJobName": transform_job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -25987,6 +26577,10 @@ def refresh( operation_input_args = { "TransformJobName": self.transform_job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_transform_job(**operation_input_args) @@ -26017,6 +26611,10 @@ def stop(self) -> None: operation_input_args = { "TransformJobName": self.transform_job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.stop_transform_job(**operation_input_args) logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") @@ -26137,11 +26735,9 @@ def get_all( "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -26305,6 +26901,10 @@ def get( operation_input_args = { "TrialName": trial_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -26343,6 +26943,10 @@ def refresh( operation_input_args = { "TrialName": self.trial_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_trial(**operation_input_args) @@ -26419,6 +27023,10 @@ def delete( operation_input_args = { "TrialName": self.trial_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_trial(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -26480,11 +27088,9 @@ def get_all( "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -26678,6 +27284,10 @@ def get( operation_input_args = { "TrialComponentName": trial_component_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -26716,6 +27326,10 @@ def refresh( operation_input_args = { "TrialComponentName": self.trial_component_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_trial_component(**operation_input_args) @@ -26815,6 +27429,10 @@ def delete( operation_input_args = { "TrialComponentName": self.trial_component_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_trial_component(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -26934,11 +27552,9 @@ def get_all( "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -26982,7 +27598,9 @@ def associate_trail( "TrialComponentName": self.trial_component_name, "TrialName": trial_name, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -27024,7 +27642,9 @@ def disassociate_trail( "TrialComponentName": self.trial_component_name, "TrialName": trial_name, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" @@ -27241,6 +27861,10 @@ def get( "DomainId": domain_id, "UserProfileName": user_profile_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -27281,6 +27905,10 @@ def refresh( "DomainId": self.domain_id, "UserProfileName": self.user_profile_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_user_profile(**operation_input_args) @@ -27362,6 +27990,10 @@ def delete( "DomainId": self.domain_id, "UserProfileName": self.user_profile_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_user_profile(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -27552,11 +28184,9 @@ def get_all( "UserProfileNameContains": user_profile_name_contains, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -27724,6 +28354,10 @@ def get( operation_input_args = { "WorkforceName": workforce_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -27761,6 +28395,10 @@ def refresh( operation_input_args = { "WorkforceName": self.workforce_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_workforce(**operation_input_args) @@ -27845,6 +28483,10 @@ def delete( operation_input_args = { "WorkforceName": self.workforce_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_workforce(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -28012,11 +28654,9 @@ def get_all( "NameContains": name_contains, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -28168,6 +28808,10 @@ def get( operation_input_args = { "WorkteamName": workteam_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" ) @@ -28205,6 +28849,10 @@ def refresh( operation_input_args = { "WorkteamName": self.workteam_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_workteam(**operation_input_args) @@ -28292,6 +28940,10 @@ def delete( operation_input_args = { "WorkteamName": self.workteam_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_workteam(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -28343,11 +28995,9 @@ def get_all( "NameContains": name_contains, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -28409,12 +29059,9 @@ def get_all_labeling_jobs( "SortBy": sort_by, "SortOrder": sort_order, } - operation_input_args = { - k: v - for k, v in operation_input_args.items() - if v is not None and not isinstance(v, Unassigned) - } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client( session=session, region_name=region, service_name="sagemaker" diff --git a/src/sagemaker_core/main/utils.py b/src/sagemaker_core/main/utils.py index e617f53a..da907fd1 100644 --- a/src/sagemaker_core/main/utils.py +++ b/src/sagemaker_core/main/utils.py @@ -267,7 +267,7 @@ def pascal_to_snake(pascal_str): def is_not_primitive(obj): - return not isinstance(obj, (int, float, str, bool, complex)) + return not isinstance(obj, (int, float, str, bool, datetime.datetime)) def is_not_str_dict(obj): diff --git a/src/sagemaker_core/tools/resources_codegen.py b/src/sagemaker_core/tools/resources_codegen.py index ae156613..12e65b0d 100644 --- a/src/sagemaker_core/tools/resources_codegen.py +++ b/src/sagemaker_core/tools/resources_codegen.py @@ -56,7 +56,6 @@ RESOURCE_BASE_CLASS_TEMPLATE, RETURN_ITERATOR_TEMPLATE, SERIALIZE_INPUT_TEMPLATE, - SERIALIZE_LIST_INPUT_TEMPLATE, STOP_METHOD_TEMPLATE, DELETE_METHOD_TEMPLATE, WAIT_FOR_DELETE_METHOD_TEMPLATE, @@ -1686,7 +1685,7 @@ def generate_additional_get_all_method(self, method: Method, resource_attributes resource_iterator_args = ",\n".join(resource_iterator_args_list) resource_iterator_args = add_indent(resource_iterator_args, 8) - serialize_operation_input = SERIALIZE_LIST_INPUT_TEMPLATE.format( + serialize_operation_input = SERIALIZE_INPUT_TEMPLATE.format( operation_input_args=operation_input_args ) initialize_client = INITIALIZE_CLIENT_TEMPLATE.format(service_name=method.service_name) diff --git a/src/sagemaker_core/tools/templates.py b/src/sagemaker_core/tools/templates.py index 681c4431..5a991a18 100644 --- a/src/sagemaker_core/tools/templates.py +++ b/src/sagemaker_core/tools/templates.py @@ -291,6 +291,10 @@ def get( operation_input_args = {{ {operation_input_args} }} + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {{operation_input_args}}") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='{service_name}') response = client.{operation}(**operation_input_args) @@ -312,6 +316,10 @@ def refresh( operation_input_args = {{ {operation_input_args} }} + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {{operation_input_args}}") + client = Base.get_sagemaker_client() response = client.{operation}(**operation_input_args) @@ -497,6 +505,10 @@ def delete( operation_input_args = {{ {operation_input_args} }} + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {{operation_input_args}}") + client.{operation}(**operation_input_args) logger.info(f"Deleting {{self.__class__.__name__}} - {{self.get_name()}}") @@ -511,6 +523,10 @@ def stop(self) -> None: operation_input_args = {{ {operation_input_args} }} + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {{operation_input_args}}") + client.{operation}(**operation_input_args) logger.info(f"Stopping {{self.__class__.__name__}} - {{self.get_name()}}") @@ -532,7 +548,9 @@ def get_all( {operation_input_args} }} {custom_key_mapping} - operation_input_args = {{k: v for k, v in operation_input_args.items() if v is not None and not isinstance(v, Unassigned)}} + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {{operation_input_args}}") return ResourceIterator( {resource_iterator_args} @@ -582,7 +600,9 @@ def {method_name}( operation_input_args = {{ {operation_input_args} }} - logger.debug(f"Input request: {{operation_input_args}}")""" + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {{operation_input_args}}")""" INITIALIZE_CLIENT_TEMPLATE = """ client = Base.get_sagemaker_client(session=session, region_name=region, service_name='{service_name}')""" @@ -604,13 +624,6 @@ def {method_name}( DESERIALIZE_RESPONSE_TO_BASIC_TYPE_TEMPLATE = """ return list(response.values())[0]""" -SERIALIZE_LIST_INPUT_TEMPLATE = """ - operation_input_args = {{ -{operation_input_args} - }} - operation_input_args = {{k: v for k, v in operation_input_args.items() if v is not None and not isinstance(v, Unassigned)}} - logger.debug(f"Input request: {{operation_input_args}}")""" - RETURN_ITERATOR_TEMPLATE = """ return ResourceIterator( {resource_iterator_args} diff --git a/tst/tools/test_resources_codegen.py b/tst/tools/test_resources_codegen.py index 3548aabc..d0fe2653 100644 --- a/tst/tools/test_resources_codegen.py +++ b/tst/tools/test_resources_codegen.py @@ -371,6 +371,10 @@ def get( 'AppType': app_type, 'AppName': app_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') response = client.describe_app(**operation_input_args) @@ -416,6 +420,10 @@ def refresh( 'AppType': self.app_type, 'AppName': self.app_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client = Base.get_sagemaker_client() response = client.describe_app(**operation_input_args) @@ -466,6 +474,10 @@ def delete( operation_input_args = { 'CompilationJobName': self.compilation_job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.delete_compilation_job(**operation_input_args) logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") @@ -503,6 +515,10 @@ def stop(self) -> None: operation_input_args = { 'CompilationJobName': self.compilation_job_name, } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + client.stop_compilation_job(**operation_input_args) logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") @@ -952,7 +968,9 @@ def get_all( 'SpaceNameEquals': space_name_equals, } - operation_input_args = {k: v for k, v in operation_input_args.items() if v is not None and not isinstance(v, Unassigned)} + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -1053,7 +1071,9 @@ def get_all( 'CreationTimeAfter': creation_time_after, } custom_key_mapping = {"monitoring_job_definition_name": "job_definition_name", "monitoring_job_definition_arn": "job_definition_arn"} - operation_input_args = {k: v for k, v in operation_input_args.items() if v is not None and not isinstance(v, Unassigned)} + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") return ResourceIterator( client=client, @@ -1109,7 +1129,9 @@ def get_node( 'ClusterName': self.cluster_name, 'NodeId': node_id, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') @@ -1169,7 +1191,9 @@ def update_weights_and_capacities( 'EndpointName': self.endpoint_name, 'DesiredWeightsAndCapacities': desired_weights_and_capacities, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') @@ -1239,8 +1263,9 @@ def get_all_training_jobs( 'SortBy': sort_by, 'SortOrder': sort_order, } - operation_input_args = {k: v for k, v in operation_input_args.items() if v is not None and not isinstance(v, Unassigned)} - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') @@ -1363,7 +1388,9 @@ def create( 'SpaceName': space_name, 'LandingUri': landing_uri, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') diff --git a/workflow_helper/compute_boto_api_coverage.py b/workflow_helper/compute_boto_api_coverage.py index 34928294..474f4914 100644 --- a/workflow_helper/compute_boto_api_coverage.py +++ b/workflow_helper/compute_boto_api_coverage.py @@ -6,7 +6,7 @@ def main(): """ This function computes the number of APIs covered and uncovered by sagemaker core to the ones in Botocore. """ - configure_logging("ERROR") # Disable other log messages + configure_logging("ERROR") # Disable other log messages resources_extractor = ResourcesExtractor() # Print the number of unsupported Botocore API and supported Botocore API print(len(resources_extractor.actions), len(resources_extractor.actions_under_resource))