-
Notifications
You must be signed in to change notification settings - Fork 1.2k
breaking: force image_uri to be passed for legacy TF images #1539
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
This change also reorganizes the TF unit tests a bit, and updates the tf_version fixture to include recent versions.
assert actual_train_args == expected_train_args | ||
|
||
|
||
def test_hyperparameters_no_model_dir(sagemaker_session): |
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.
this test is new
assert expected_image == tf.train_image() | ||
|
||
|
||
def test_train_image_custom_image(sagemaker_session): |
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.
this test is new
assert tf.enable_sagemaker_metrics | ||
|
||
|
||
def test_require_image_name_if_fw_ver_is_less_than_1_11(sagemaker_session, tf_version): |
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.
this test is new
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 |
|
||
@pytest.fixture() | ||
def sagemaker_session(): | ||
boto_mock = Mock(name="boto_session", region_name=REGION) |
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.
side question: using botocore.stub
a possibility?
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.
good suggestion. seems like we could use it for mocking out the clients that sagemaker_session keeps track of explicitly across our unit tests.
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 |
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.
looks good to me
* feat: Adding BRS support
* feat: Adding BRS support
* feat: Adding BRS support
Issue #, if available:
#1462
Description of changes:
script_mode
setting from the TF estimator.model_dir=False
won't pass on themodel_dir
hyperparameter. This is because the legacy TF images don't accept it. This particular pattern follows the waydebugger_hook_config
works in estimators.self.model_dir
, and I don't want to have a function responsible for replicating the various options of TB.test_tf_estimator.py
file. If the diff is too much as a result, I can revert it.test_fw_utils.py
already takes care of thecreate_image_uri
logic, and there were two unit tests for deploying an estimator with a custom image.tf_version
fixture to include recent versions, as it was relevant for some of the unit tests I added.Because the diff is already a lot, I'll update the migration script in a separate PR.
Testing done:
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.