Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
1c9dd16aa349fdc875c473e23a39e9a96ec1d66433dc8e4f798a0a5e7f44c65b33deb98da65094f85786cb2a489c9dcdd0ed177e8816030e0b77be789bb6d640da473c251fcce010da9edeb5013255b04403298e2a7f1543b10a769c2bb6cfe14848fa84753ff376d8598f83331110b4fa04c1aFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -19,6 +19,7 @@ | ||
| import pytest | ||
| from sagemaker.tensorflow import TensorFlow | ||
| from sagemaker.tensorflow.defaults import LATEST_SERVING_VERSION | ||
| from sagemaker.utils import unique_name_from_base, sagemaker_timestamp | ||
| import tests.integ | ||
| @@ -40,10 +41,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 +60,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 +90,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 +104,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? ContributorAuthor 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 +139,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 +167,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=LATEST_SERVING_VERSION, | ||
| tags=TAGS, | ||
| ) | ||
| inputs = estimator.sagemaker_session.upload_data( | ||
| @@ -200,7 +199,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 +211,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, | ||
| ) | ||
Uh oh!
There was an error while loading. Please reload this page.