Skip to content

Add describe_hyper_parameter_tuning_job() to the SageMaker Session class #1589

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
alex23lemm opened this issue Jun 13, 2020 · 2 comments
Closed
Labels
status: pending release The fix have been merged but not yet released to PyPI

Comments

@alex23lemm
Copy link

Is your feature request related to a problem? Please describe.
A SageMaker Session object comes with the following methods which allow me to retrieve the status of training, batch transform, processing and AutoML jobs: describe_training_job(), describe_transform_job(), describe_processing_job(), describe_auto_ml_job(). Examples:

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"]

However, if I like to get the status of a hyperparameter tuning job in the same workflow, I need to use one of the following two options:

Option 1: Use the following two lines of code

tuning_job_results = sagemaker.HyperparameterTuningJobAnalytics("[YOUR_JOB_NAME]")
tuning_job_results.description()["HyperParameterTuningJobStatus"]

Option 2: Create an extra low-level SageMaker client using boto3:

import boto3

sm = boto3.client("sagemaker")
sm.describe_hyper_parameter_tuning_job(HyperParameterTuningJobName = "[YOUR_JOB_NAME]")["HyperParameterTuningJobStatus"]

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

@laurenyu
Copy link
Contributor

#1594 has been merged. should get released later today

@laurenyu laurenyu added status: pending release The fix have been merged but not yet released to PyPI and removed In progress labels Jun 17, 2020
@laurenyu
Copy link
Contributor

released in https://github.com/aws/sagemaker-python-sdk/releases/tag/v1.65.0

benieric pushed a commit that referenced this issue Dec 4, 2024
* feat: AMI support for BRM
benieric pushed a commit that referenced this issue Dec 5, 2024
* feat: AMI support for BRM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: pending release The fix have been merged but not yet released to PyPI
Projects
None yet
Development

No branches or pull requests

3 participants