-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feature: support TensorFlow training 2.2 #1521
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
Changes from 32 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
1c9dd16
update with aws/master
chuyang-deng aa349fd
upate with aws master
chuyang-deng c875c47
update with aws master
chuyang-deng 3e23a39
feature: TensorFlow 2.2 support
e9a96ec
Merge branch 'master' into tf-2-2
chuyang-deng 1d66433
prevent TFS test pulling 2.2.0 images
dc8e4f7
Merge branch 'tf-2-2' of github.com:ChuyangDeng/sagemaker-python-sdk …
98a0a5e
fix flake8 error
7f44c65
update tfs test versions
b33deb9
use tfs 2.1.0 in model monitor tests
8da6509
distinguish tf and tfs latest versions in test
4f85786
add latest serving version
cb2a489
let py_version pick up tf_training_version
c9dcdd0
Merge branch 'master' into tf-2-2
chuyang-deng ed177e8
fix typo
816030e
Merge branch 'tf-2-2' of github.com:ChuyangDeng/sagemaker-python-sdk …
0b77be7
no py37 for tfs 2.1
89bb6d6
fix black error
40da473
prevent tfs pulling 2.2 image
c251fcc
tf 2.2 using py37
e010da9
Merge branch 'tf-2-2' of github.com:ChuyangDeng/sagemaker-python-sdk …
edeb501
Merge branch 'master' into tf-2-2
chuyang-deng 3255b04
test_data_capture_config use TFS latest version
403298e
Merge branch 'tf-2-2' of github.com:ChuyangDeng/sagemaker-python-sdk …
2a7f154
fix flake8 error
3b10a76
update model monitoring test
9c2bb6c
update python version for tuner integ test
fe14848
address comments
fa84753
Merge branch 'ChuyangDeng-tf-2-2'
ff376d8
fix import error
598f833
resolve conflicts
31110b4
hardcode py_version for tensorflow-training 2.2 tests
fa04c1a
import LATEST_SERVING_VERSION from TensorFlow.defaults
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,10 +40,8 @@ | |
|
|
||
|
|
||
| @pytest.fixture(scope="module") | ||
| def py_version(tf_full_version): | ||
| return ( | ||
| "py37" if tf_full_version == TensorFlow._LATEST_1X_VERSION else tests.integ.PYTHON_VERSION | ||
| ) | ||
| def py_version(tf_full_version, tf_serving_version): | ||
| return "py37" if tf_full_version == tf_serving_version else tests.integ.PYTHON_VERSION | ||
|
|
||
|
|
||
| def test_mnist_with_checkpoint_config( | ||
|
|
@@ -61,7 +59,7 @@ def test_mnist_with_checkpoint_config( | |
| sagemaker_session=sagemaker_session, | ||
| script_mode=True, | ||
| framework_version=tf_full_version, | ||
| py_version=py_version, | ||
| py_version="py37", | ||
| metric_definitions=[{"Name": "train:global_steps", "Regex": r"global_step\/sec:\s(.*)"}], | ||
| checkpoint_s3_uri=checkpoint_s3_uri, | ||
| checkpoint_local_path=checkpoint_local_path, | ||
|
|
@@ -91,7 +89,7 @@ def test_mnist_with_checkpoint_config( | |
| assert actual_training_checkpoint_config == expected_training_checkpoint_config | ||
|
|
||
|
|
||
| def test_server_side_encryption(sagemaker_session, tf_full_version, py_version): | ||
| def test_server_side_encryption(sagemaker_session, tf_serving_version, py_version): | ||
| with kms_utils.bucket_with_encryption(sagemaker_session, ROLE) as (bucket_with_kms, kms_key): | ||
| output_path = os.path.join( | ||
| bucket_with_kms, "test-server-side-encryption", time.strftime("%y%m%d-%H%M") | ||
|
|
@@ -105,7 +103,7 @@ def test_server_side_encryption(sagemaker_session, tf_full_version, py_version): | |
| train_instance_type="ml.c5.xlarge", | ||
| sagemaker_session=sagemaker_session, | ||
| script_mode=True, | ||
| framework_version=tf_full_version, | ||
| framework_version=tf_serving_version, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why switch to using a serving version for training?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. because this test is doing a deploy later and TFS does not support 2.2 yet. |
||
| py_version=py_version, | ||
| code_location=output_path, | ||
| output_path=output_path, | ||
|
|
@@ -140,7 +138,7 @@ def test_mnist_distributed(sagemaker_session, instance_type, tf_full_version, py | |
| train_instance_count=2, | ||
| train_instance_type=instance_type, | ||
| sagemaker_session=sagemaker_session, | ||
| py_version=py_version, | ||
| py_version="py37", | ||
| script_mode=True, | ||
| framework_version=tf_full_version, | ||
| distributions=PARAMETER_SERVER_DISTRIBUTION, | ||
|
|
@@ -168,7 +166,7 @@ def test_mnist_async(sagemaker_session, cpu_instance_type, tf_full_version, py_v | |
| sagemaker_session=sagemaker_session, | ||
| script_mode=True, | ||
| # testing py-sdk functionality, no need to run against all TF versions | ||
| framework_version=TensorFlow.LATEST_VERSION, | ||
| framework_version=TensorFlow.LATEST_SERVING_VERSION, | ||
| tags=TAGS, | ||
| ) | ||
| inputs = estimator.sagemaker_session.upload_data( | ||
|
|
@@ -200,7 +198,9 @@ def test_mnist_async(sagemaker_session, cpu_instance_type, tf_full_version, py_v | |
| _assert_model_name_match(sagemaker_session.sagemaker_client, endpoint_name, model_name) | ||
|
|
||
|
|
||
| def test_deploy_with_input_handlers(sagemaker_session, instance_type, tf_full_version, py_version): | ||
| def test_deploy_with_input_handlers( | ||
| sagemaker_session, instance_type, tf_serving_version, py_version | ||
| ): | ||
| estimator = TensorFlow( | ||
| entry_point="training.py", | ||
| source_dir=TFS_RESOURCE_PATH, | ||
|
|
@@ -210,7 +210,7 @@ def test_deploy_with_input_handlers(sagemaker_session, instance_type, tf_full_ve | |
| py_version=py_version, | ||
| sagemaker_session=sagemaker_session, | ||
| script_mode=True, | ||
| framework_version=tf_full_version, | ||
| framework_version=tf_serving_version, | ||
| tags=TAGS, | ||
| ) | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.