Conversation
… estimator.transformer()
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
metrizable
left a comment
There was a problem hiding this comment.
looks good. a few questions, comments.
src/sagemaker/estimator.py
Outdated
| if isinstance(self, sagemaker.algorithm.AlgorithmEstimator): | ||
| self.base_job_name = self.algorithm_arn.split("/")[-1] # pylint: disable=no-member |
There was a problem hiding this comment.
Beyond scope for this PR, but I wonder if you want to model this so it can be resolved as an overridden method in AlgorithmEstimator to favor co-locating logic specific to derived classes to those derived classes. I've seen other violations of LSP/sub-type leakage elsewhere in the package, so it may be worth looking into in the future.
There was a problem hiding this comment.
I'd been annoyed at this one previously, and hadn't changed it before because it was embedded in the method, but now that I'm refactoring it out...
src/sagemaker/estimator.py
Outdated
| self._ensure_base_job_name() | ||
| model_name = model_name or name_from_base(self.base_job_name) |
There was a problem hiding this comment.
I've seen this logic elsewhere. Is it worth defining a method to capture and re-use?
There was a problem hiding this comment.
created a method (feel free to suggest a better name for it)
src/sagemaker/pytorch/estimator.py
Outdated
| self._ensure_base_job_name() | ||
| kwargs["name"] = utils.name_from_base(self.base_job_name) |
There was a problem hiding this comment.
I've seen this logic in multiple places. Is it worth creating a re-usable method?
There was a problem hiding this comment.
I've changed it to use the method defined in response to your above comment. I know there's more in the create_model methods that could probably more generally be refactored, but I think that's out of scope here.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Issue #, if available:
#1470, #987
Description of changes:
By reusing the training job name for models, endpoint configs, and endpoints, trying to call
deploy()twice on the same estimator can lead to a frustrating experience (e.g. #987).I thought about letting the respective Model classes handle the name generation, but thought it would be nice to honor
base_job_name, so that's why I went with what I did.Testing done:
unit and integ tests
Merge Checklist
Put an
xin 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.General
Tests
unique_name_from_baseto create resource names in integ tests (if appropriate)By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.