Skip to content

Add new APIs to clean up resources from predictor and transformer. #630

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

Merged
merged 17 commits into from
Feb 13, 2019
Merged

Add new APIs to clean up resources from predictor and transformer. #630

merged 17 commits into from
Feb 13, 2019

Conversation

chuyang-deng
Copy link
Contributor

@chuyang-deng chuyang-deng commented Feb 7, 2019

… transformer to delete model.

Issue #, if available:
#447

Description of changes:

  • Add support to delete endpoint configuration by default within delete_endpoint() to predictor class.
  • Add delete_model() to transformer class. Instead of linking a model class to it, the transformer class directly calls session's delete_model() method because it already has access to the model_name. We don't want to pass in a model object on top of that. We don't want to construct a model object here either because that requires extra parameters, such as the s3 path to the model artifacts, while we can just utilize the model_name variable.

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have updated the changelog with a description of my changes (if appropriate)
  • I have updated any necessary documentation (if appropriate)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@chuyang-deng
Copy link
Contributor Author

I only included changes regarding deleting endpoint/endpoint config in this PR. model class linkage changes will be sent in a separate one because many files will be changed to link model and I don't want this PR to be too long.

Copy link
Contributor

@ChoiByungWook ChoiByungWook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good!

Let's update the first PR conversation in regards to why the linking of the model isn't done within the Transformer class and instead the session is called.

Let's also relate this PR and your upcoming model linkage PR to this issue: #447

As it is in regards to delete_model and delete_endpoint config.

Copy link
Contributor

@ChoiByungWook ChoiByungWook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had some general comments. It looks really good!

Let's fix the title of this PR, since the original title was too long and it is being cut off.

@chuyang-deng chuyang-deng changed the title Add new APIs to predictor to delete endpoint and endpoint config, and… Add new APIs to clean up resources from predictor and transformer. Feb 8, 2019
Copy link
Contributor

@ChoiByungWook ChoiByungWook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Just left some minor comments in regards to the tests.

ChoiByungWook
ChoiByungWook previously approved these changes Feb 11, 2019
Copy link
Contributor

@ChoiByungWook ChoiByungWook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@ChoiByungWook ChoiByungWook self-assigned this Feb 12, 2019
@chuyang-deng chuyang-deng mentioned this pull request Feb 12, 2019
4 tasks
@@ -8,6 +8,9 @@ CHANGELOG
* doc-fix: update information about saving models in the MXNet README
* doc-fix: change ReadTheDocs links from latest to stable
* doc-fix: add ``transform_fn`` information and fix ``input_fn`` signature in the MXNet README
* feature: Support for ``Predictor`` to delete endpoint configuration by default when calling ``delete_endpoint()``
* feature: Support for ``model`` to delete SageMaker model
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the model should be uppercase, but we can fix in the other PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants