-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: preserve model_dir bool value #1954
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
Conversation
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 |
Can we fix it in https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/estimator.py#L1116-L1117 |
or if you want to limit blast radius fix it here - sagemaker-python-sdk/src/sagemaker/tensorflow/estimator.py Lines 320 to 321 in 21ef053
|
This will also result in setting I will try with making changes here: https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/estimator.py#L1116-L1117 (I was hesitant at first because I was afraid it might break something else, but I will make sure it doesn't) |
you can make it explicit by adding another if statement |
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 |
hyperparameters = {str(k): str(v) for (k, v) in estimator.hyperparameters().items()} | ||
current_hyperparameters = estimator.hyperparameters() | ||
if current_hyperparameters is not None: | ||
hyperparameters = {str(k): str(v) for (k, v) in current_hyperparameters.items()} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can remove the parentheses:
hyperparameters = {str(k): str(v) for (k, v) in current_hyperparameters.items()} | |
hyperparameters = {str(k): str(v) for k, v in current_hyperparameters.items()} |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
* fix: preserve model_dir bool value * avoid calling hyperparaneters twince Co-authored-by: Chuyang Deng <[email protected]> Co-authored-by: icywang86rui <[email protected]>
Issue #, if available:
TensorFlow
estimator's parammodel_dir
will be changed toNone
if it was set toFalse
by user after.hyperparameter()
is called in https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/estimator.py#L1116-L1117 (.hyperparameters()
called twice). It will later get set to a default s3 value when it's called the second time because its value is no longerFalse
https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/tensorflow/estimator.py#L319.Description of changes:
Adding a
disable_model_dir
param toTensorFlow
class to make sure the boolean value is used as intended.Corresponding change in sagemaker-tensorflow-training-toolkit: aws/sagemaker-tensorflow-training-toolkit#403
Testing done:
tox -e py38 -- tests/unit
tox -e py38 -- tests/component/test_tf_estimator.py
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.General
Tests
unique_name_from_base
to 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.