Returns an MLModel that includes detailed metadata, data source information, and the current status of the MLModel.
GetMLModel provides results in normal or verbose format.
Parameters:
-
ml_model_id
(EntityId)
–
The ID assigned to the MLModel at creation.
-
verbose
(Optional[Verbose], default:
None
)
–
Specifies whether the GetMLModel operation should return Recipe.
If true, Recipe is returned.
If false, Recipe is not returned.
Raises:
Source code in docs_src/capo_machine_learning/_services/machine_learning.py
| def get_ml_model(
self,
ml_model_id: "capo_machine_learning.types.entity_id.EntityId",
*,
config_overrides: Optional[MachineLearningClientConfig] = None,
verbose: Optional["capo_machine_learning.types.verbose.Verbose"] = None,
) -> "capo_machine_learning.types.get_ml_model_output.GetMLModelOutput":
"""<p>Returns an <code>MLModel</code> that includes detailed metadata, data source information, and the current status of the <code>MLModel</code>.</p> <p> <code>GetMLModel</code> provides results in normal or verbose format. </p>
Args:
ml_model_id: <p>The ID assigned to the <code>MLModel</code> at creation.</p>
verbose: <p>Specifies whether the <code>GetMLModel</code> operation should return <code>Recipe</code>.</p> <p>If true, <code>Recipe</code> is returned.</p> <p>If false, <code>Recipe</code> is not returned.</p>
Raises:
capo_machine_learning.errors.internal_server_exception.InternalServerException: <p>An error on the server occurred when trying to process a request.</p>
capo_machine_learning.errors.invalid_input_exception.InvalidInputException: <p>An error on the client occurred. Typically, the cause is an invalid input value.</p>
capo_machine_learning.errors.resource_not_found_exception.ResourceNotFoundException: <p>A specified resource cannot be located.</p>
capo_machine_learning.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_machine_learning.types.get_ml_model_input.GetMLModelInput]",
) -> OperationResponse[
"capo_machine_learning.types.get_ml_model_output.GetMLModelOutput"
]:
import capo_machine_learning._operations.amazon_ml_20141212.get_ml_model
output, http_response = (
capo_machine_learning._operations.amazon_ml_20141212.get_ml_model.get_ml_model(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetMLModel")
)
input_: capo_machine_learning.types.get_ml_model_input.GetMLModelInput = {
"ml_model_id": ml_model_id
}
if verbose is not None:
input_["verbose"] = verbose
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|