Removes the specified algorithm from your account.
Parameters:
-
algorithm_name
(Optional[EntityName], default:
None
)
–
The name of the algorithm to delete.
Raises:
-
ConflictException
–
There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_sagemaker/_services/sage_maker.py
| def delete_algorithm(
self,
*,
config_overrides: Optional[SageMakerClientConfig] = None,
algorithm_name: Optional["capo_sagemaker.types.entity_name.EntityName"] = None,
) -> None:
"""<p>Removes the specified algorithm from your account.</p>
Args:
algorithm_name: <p>The name of the algorithm to delete.</p>
Raises:
capo_sagemaker.errors.conflict_exception.ConflictException: <p>There was a conflict when you attempted to modify a SageMaker entity such as an <code>Experiment</code> or <code>Artifact</code>.</p>
capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_sagemaker.types.delete_algorithm_input.DeleteAlgorithmInput]",
) -> OperationResponse[None]:
import capo_sagemaker._operations.sage_maker.delete_algorithm
output, http_response = (
capo_sagemaker._operations.sage_maker.delete_algorithm.delete_algorithm(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteAlgorithm")
)
input_: capo_sagemaker.types.delete_algorithm_input.DeleteAlgorithmInput = {}
if algorithm_name is not None:
input_["algorithm_name"] = algorithm_name
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|