sagemaker.core.remote_function.errors#

Definitions for reomote job errors and error handling

Functions

handle_error(error, sagemaker_session, ...)

Handle all exceptions raised during remote function execution.

Exceptions

DeserializationError(message)

Raised when errors encountered during deserialization of remote function objects

RemoteFunctionError(message)

The base exception class for remote function exceptions

SerializationError(message)

Raised when errors encountered during serialization of remote function objects

ServiceError(message)

Raised when errors encountered during interaction with SageMaker, S3 service APIs

exception sagemaker.core.remote_function.errors.DeserializationError(message)[source]#

Bases: RemoteFunctionError

Raised when errors encountered during deserialization of remote function objects

exception sagemaker.core.remote_function.errors.RemoteFunctionError(message)[source]#

Bases: Exception

The base exception class for remote function exceptions

exception sagemaker.core.remote_function.errors.SerializationError(message)[source]#

Bases: RemoteFunctionError

Raised when errors encountered during serialization of remote function objects

exception sagemaker.core.remote_function.errors.ServiceError(message)[source]#

Bases: RemoteFunctionError

Raised when errors encountered during interaction with SageMaker, S3 service APIs

sagemaker.core.remote_function.errors.handle_error(error, sagemaker_session, s3_base_uri, s3_kms_key) int[source]#

Handle all exceptions raised during remote function execution.

Parameters:
  • error (Exception) – The error to be handled.

  • sagemaker_session (sagemaker.core.helper.session.Session) – The underlying Boto3 session which AWS service calls are delegated to.

  • s3_base_uri (str) – S3 root uri to which resulting serialized exception will be uploaded.

  • s3_kms_key (str) – KMS key used to encrypt artifacts uploaded to S3.

Returns :

exit_code (int): Exit code to terminate current job.