aws / sagemaker-python-sdk

A library for training and deploying machine learning models on Amazon SageMaker
https://sagemaker.readthedocs.io/
Apache License 2.0
2.09k stars 1.13k forks source link

Add describe_endpoint() to the Session class #1826

Open alex23lemm opened 4 years ago

alex23lemm commented 4 years ago

Is your feature request related to a problem? Please describe. A Session object comes with the following methods which allow me to retrieve the status of training, batch transform, processing, AutoML and tuning jobs:

import sagemaker

session = sagemaker.Session()
session.describe_training_job("[YOUR_JOB_NAME]")["TrainingJobStatus"]
session.describe_transform_job("[YOUR_JOB_NAME]")["TransformJobStatus"]
session.describe_processing_job("[YOUR_JOB_NAME]")["ProcessingJobStatus"]
session.describe_auto_ml_job("[YOUR_JOB_NAME]")["AutoMLJobStatus"]
session.describe_tuning_job("[]YOUR_JOB_NAME")["HyperParameterTuningJobStatus"]

However, if I like to get the status of an endpoint in the same workflow, I need to instantiate an extra low-level SageMaker client using boto3:

import boto3

sm = boto3.client("sagemaker")
sm.describe_endpoint(EndpointName = "[YOUR_ENDPOINT_NAME]")["EndpointStatus"]

Describe the solution you'd like Even though the above option works, it could become much more concise and smoother by adding a describe_endpoint() method to the Session class. This would harmonize the family of describe_[...]() functions.

metrizable commented 4 years ago

@alex23lemm Thank you for using Amazon SageMaker.

I see that you are requesting the ability to describe endpoints from the sagemaker.Session instance itself in order to inspect and use the results in existing workflows.

You've cited one work-around for using the lower level boto3 client, but, as cited, it is not as concise nor as consistent as if it were a first class method on sagemaker.Session instances.

We are always re-evaluating our backlog of features based on customer requests, so we appreciate the feedback on this feature.

Let us know if there is anything else we can be an assistance of.