sagemaker.core.jumpstart.exceptions#
This module stores exceptions related to SageMaker JumpStart.
Functions
|
Returns customer-facing message associated with using an old model version. |
Returns customer-facing message associated with a Marketplace subscription error. |
|
Returns customer-facing message for using a proprietary model. |
|
|
Returns customer-facing message for using a model version with a wildcard character. |
Returns customer-facing message for passing wildcard version to proprietary models. |
Exceptions
|
Exception raised when trying to access a JumpStart model deprecated specifications. |
|
Exception raised for bad hyperparameters of a JumpStart model. |
Exception raised when trying to deploy a JumpStart Marketplace model. |
|
|
Exception raised when trying to access a JumpStart model specs flagged as vulnerable. |
- exception sagemaker.core.jumpstart.exceptions.DeprecatedJumpStartModelError(model_id: str | None = None, version: str | None = None, message: str | None = None)[source]#
Bases:
ValueErrorException raised when trying to access a JumpStart model deprecated specifications.
A deprecated specification for a JumpStart model does not mean the whole model is deprecated. There may be more recent specifications available for this model. For example, all specification before version
2.0.0may be deprecated, in such a case, the SDK would raise this exception only when specifications1.*are accessed.
- exception sagemaker.core.jumpstart.exceptions.JumpStartHyperparametersError(message: str | None = None)[source]#
Bases:
ValueErrorException raised for bad hyperparameters of a JumpStart model.
- exception sagemaker.core.jumpstart.exceptions.MarketplaceModelSubscriptionError(model_subscription_link: str | None = None, message: str | None = None)[source]#
Bases:
ValueErrorException raised when trying to deploy a JumpStart Marketplace model.
A caller is required to subscribe to the Marketplace product in order to deploy. This exception is raised when a caller tries to deploy a JumpStart Marketplace model but the caller is not subscribed to the model.
- exception sagemaker.core.jumpstart.exceptions.VulnerableJumpStartModelError(model_id: str | None = None, version: str | None = None, vulnerabilities: List[str] | None = None, scope: JumpStartScriptScope | None = None, message: str | None = None)[source]#
Bases:
ValueErrorException raised when trying to access a JumpStart model specs flagged as vulnerable.
Raise this exception only if the scope of attributes accessed in the specifications have vulnerabilities. For example, a model training script may have vulnerabilities, but not the hosting scripts. In such a case, raise a
VulnerableJumpStartModelErroronly when accessing the training specifications.
- sagemaker.core.jumpstart.exceptions.get_old_model_version_msg(model_id: str, current_model_version: str, latest_model_version: str) str[source]#
Returns customer-facing message associated with using an old model version.
- sagemaker.core.jumpstart.exceptions.get_proprietary_model_subscription_error(error: ClientError, subscription_link: str) None[source]#
Returns customer-facing message associated with a Marketplace subscription error.
- sagemaker.core.jumpstart.exceptions.get_proprietary_model_subscription_msg(model_id: str, subscription_link: str) str[source]#
Returns customer-facing message for using a proprietary model.