Skip to content

Commit ea781ed

Browse files
author
Deng
committed
remove gamma
1 parent 3fd7355 commit ea781ed

9 files changed

+4
-58
lines changed

src/sagemaker/fw_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
OPT_IN_ACCOUNTS_BY_REGION = {"ap-east-1": "057415533634", "me-south-1": "724002660598"}
6060
ASIMOV_OPT_IN_ACCOUNTS_BY_REGION = {"ap-east-1": "871362719292", "me-south-1": "217643126080"}
6161
DEFAULT_ACCOUNT = "520713654638"
62-
ASIMOV_PROD_ACCOUNT = "028651357192" if os.getenv("DLC_GAMMA_TESTING") else "763104351884"
62+
ASIMOV_PROD_ACCOUNT = "763104351884"
6363
ASIMOV_DEFAULT_ACCOUNT = ASIMOV_PROD_ACCOUNT
6464

6565
MERGED_FRAMEWORKS_REPO_MAP = {

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
from sagemaker.sklearn.defaults import SKLEARN_VERSION
3030
from sagemaker.tensorflow.estimator import TensorFlow
3131

32-
DEFAULT_REGION = "us-east-1" if os.getenv("DLC_GAMMA_TESTING") else "us-west-2"
32+
DEFAULT_REGION = "us-west-2"
3333

3434
NO_M4_REGIONS = ["eu-west-3", "eu-north-1", "ap-east-1", "sa-east-1", "me-south-1"]
3535

tests/integ/test_local_mode.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
# endpoint tests all use the same port, so we use this lock to prevent concurrent execution
3333
LOCK_PATH = os.path.join(tempfile.gettempdir(), "sagemaker_test_local_mode_lock")
3434
DATA_PATH = os.path.join(DATA_DIR, "iris", "data")
35-
DEFAULT_REGION = "us-east-1" if os.getenv("DLC_GAMMA_TESTING") else "us-west-2"
35+
DEFAULT_REGION = "us-west-2"
3636

3737

3838
class LocalNoS3Session(LocalSession):
@@ -253,7 +253,6 @@ def test_tf_local_data_local_script():
253253

254254

255255
@pytest.mark.local_mode
256-
@pytest.mark.gamma_dlc
257256
def test_local_mode_serving_from_s3_model(sagemaker_local_session, mxnet_model, mxnet_full_version):
258257
path = "s3://%s" % sagemaker_local_session.default_bucket()
259258
s3_model = mxnet_model(path)
@@ -271,7 +270,6 @@ def test_local_mode_serving_from_s3_model(sagemaker_local_session, mxnet_model,
271270

272271

273272
@pytest.mark.local_mode
274-
@pytest.mark.gamma_dlc
275273
def test_local_mode_serving_from_local_model(tmpdir, sagemaker_local_session, mxnet_model):
276274
predictor = None
277275

@@ -289,7 +287,6 @@ def test_local_mode_serving_from_local_model(tmpdir, sagemaker_local_session, mx
289287

290288

291289
@pytest.mark.local_mode
292-
@pytest.mark.gamma_dlc
293290
def test_mxnet_local_mode(sagemaker_local_session, mxnet_full_version):
294291
script_path = os.path.join(DATA_DIR, "mxnet_mnist", "mnist.py")
295292
data_path = os.path.join(DATA_DIR, "mxnet_mnist")
@@ -324,7 +321,6 @@ def test_mxnet_local_mode(sagemaker_local_session, mxnet_full_version):
324321

325322

326323
@pytest.mark.local_mode
327-
@pytest.mark.gamma_dlc
328324
def test_mxnet_local_data_local_script(mxnet_full_version):
329325
data_path = os.path.join(DATA_DIR, "mxnet_mnist")
330326
script_path = os.path.join(data_path, "mnist.py")
@@ -354,7 +350,6 @@ def test_mxnet_local_data_local_script(mxnet_full_version):
354350

355351

356352
@pytest.mark.local_mode
357-
@pytest.mark.gamma_dlc
358353
def test_mxnet_training_failure(sagemaker_local_session, mxnet_full_version, tmpdir):
359354
script_path = os.path.join(DATA_DIR, "mxnet_mnist", "failure_script.py")
360355

@@ -377,7 +372,6 @@ def test_mxnet_training_failure(sagemaker_local_session, mxnet_full_version, tmp
377372

378373

379374
@pytest.mark.local_mode
380-
@pytest.mark.gamma_dlc
381375
def test_local_transform_mxnet(
382376
sagemaker_local_session, tmpdir, mxnet_full_version, cpu_instance_type
383377
):

tests/integ/test_mxnet_train.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ def mxnet_training_job(sagemaker_session, mxnet_full_version, cpu_instance_type)
5757

5858
@pytest.mark.canary_quick
5959
@pytest.mark.regional_testing
60-
@pytest.mark.gamma_dlc
6160
def test_attach_deploy(mxnet_training_job, sagemaker_session, cpu_instance_type):
6261
endpoint_name = "test-mxnet-attach-deploy-{}".format(sagemaker_timestamp())
6362

@@ -69,7 +68,6 @@ def test_attach_deploy(mxnet_training_job, sagemaker_session, cpu_instance_type)
6968
assert result is not None
7069

7170

72-
@pytest.mark.gamma_dlc
7371
def test_deploy_model(mxnet_training_job, sagemaker_session, mxnet_full_version, cpu_instance_type):
7472
endpoint_name = "test-mxnet-deploy-model-{}".format(sagemaker_timestamp())
7573

@@ -99,7 +97,6 @@ def test_deploy_model(mxnet_training_job, sagemaker_session, mxnet_full_version,
9997
assert "Could not find model" in str(exception.value)
10098

10199

102-
@pytest.mark.gamma_dlc
103100
def test_deploy_model_with_tags_and_kms(
104101
mxnet_training_job, sagemaker_session, mxnet_full_version, cpu_instance_type
105102
):
@@ -154,7 +151,6 @@ def test_deploy_model_with_tags_and_kms(
154151
assert endpoint_config["KmsKeyId"] == kms_key_arn
155152

156153

157-
@pytest.mark.gamma_dlc
158154
def test_deploy_model_with_update_endpoint(
159155
mxnet_training_job,
160156
sagemaker_session,
@@ -205,7 +201,6 @@ def test_deploy_model_with_update_endpoint(
205201
assert new_config["ProductionVariants"][0]["InitialInstanceCount"] == 1
206202

207203

208-
@pytest.mark.gamma_dlc
209204
def test_deploy_model_with_update_non_existing_endpoint(
210205
mxnet_training_job,
211206
sagemaker_session,
@@ -244,7 +239,6 @@ def test_deploy_model_with_update_non_existing_endpoint(
244239

245240
@pytest.mark.canary_quick
246241
@pytest.mark.regional_testing
247-
@pytest.mark.gamma_dlc
248242
@pytest.mark.skipif(
249243
tests.integ.test_region() not in tests.integ.EI_SUPPORTED_REGIONS,
250244
reason="EI isn't supported in that specific region.",
@@ -277,7 +271,6 @@ def test_deploy_model_with_accelerator(
277271
assert result is not None
278272

279273

280-
@pytest.mark.gamma_dlc
281274
def test_async_fit(sagemaker_session, mxnet_full_version, cpu_instance_type):
282275
endpoint_name = "test-mxnet-attach-deploy-{}".format(sagemaker_timestamp())
283276

tests/integ/test_pytorch_train.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ def fixture_training_job(sagemaker_session, pytorch_full_version, cpu_instance_t
3838

3939
@pytest.mark.canary_quick
4040
@pytest.mark.regional_testing
41-
@pytest.mark.gamma_dlc
4241
@pytest.mark.skipif(PYTHON_VERSION == "py2", reason="PyTorch Inference not supporting Python2.")
4342
def test_sync_fit_deploy(pytorch_training_job, sagemaker_session, cpu_instance_type):
4443
# TODO: add tests against local mode when it's ready to be used
@@ -56,7 +55,6 @@ def test_sync_fit_deploy(pytorch_training_job, sagemaker_session, cpu_instance_t
5655
assert output.shape == (batch_size, 10)
5756

5857

59-
@pytest.mark.local_mode
6058
@pytest.mark.skipif(PYTHON_VERSION == "py2", reason="PyTorch Inference not supporting Python2.")
6159
def test_fit_deploy(sagemaker_local_session, pytorch_full_version):
6260
pytorch = PyTorch(
@@ -82,7 +80,6 @@ def test_fit_deploy(sagemaker_local_session, pytorch_full_version):
8280
predictor.delete_endpoint()
8381

8482

85-
@pytest.mark.gamma_dlc
8683
@pytest.mark.skipif(PYTHON_VERSION == "py2", reason="PyTorch Inference not supporting Python2.")
8784
def test_deploy_model(pytorch_training_job, sagemaker_session, cpu_instance_type):
8885
endpoint_name = "test-pytorch-deploy-model-{}".format(sagemaker_timestamp())

tests/integ/test_tf_efs_fsx.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ def efs_fsx_setup(sagemaker_session, ec2_instance_type):
5050
tear_down(sagemaker_session, fs_resources)
5151

5252

53-
@pytest.mark.gamma_dlc
5453
@pytest.mark.skipif(
5554
tests.integ.test_region() not in tests.integ.EFS_TEST_ENABLED_REGION,
5655
reason="EFS integration tests need to be fixed before running in all regions.",
@@ -91,7 +90,6 @@ def test_mnist_efs(efs_fsx_setup, sagemaker_session, cpu_instance_type):
9190
)
9291

9392

94-
@pytest.mark.gamma_dlc
9593
@pytest.mark.skipif(
9694
tests.integ.test_region() not in tests.integ.EFS_TEST_ENABLED_REGION,
9795
reason="EFS integration tests need to be fixed before running in all regions.",
@@ -128,7 +126,6 @@ def test_mnist_lustre(efs_fsx_setup, sagemaker_session, cpu_instance_type):
128126
)
129127

130128

131-
@pytest.mark.gamma_dlc
132129
@pytest.mark.skipif(
133130
tests.integ.test_region() not in tests.integ.EFS_TEST_ENABLED_REGION,
134131
reason="EFS integration tests need to be fixed before running in all regions.",
@@ -177,7 +174,6 @@ def test_tuning_tf_script_mode_efs(efs_fsx_setup, sagemaker_session, cpu_instanc
177174
assert best_training_job
178175

179176

180-
@pytest.mark.gamma_dlc
181177
@pytest.mark.skipif(
182178
tests.integ.test_region() not in tests.integ.EFS_TEST_ENABLED_REGION,
183179
reason="EFS integration tests need to be fixed before running in all regions.",

tests/integ/test_tf_script_mode.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
TAGS = [{"Key": "some-key", "Value": "some-value"}]
4040

4141

42-
@pytest.mark.gamma_dlc
4342
def test_mnist_with_checkpoint_config(sagemaker_session, instance_type, tf_full_version):
4443
checkpoint_s3_uri = "s3://{}/checkpoints/tf-{}".format(
4544
sagemaker_session.default_bucket(), sagemaker_timestamp()
@@ -83,7 +82,6 @@ def test_mnist_with_checkpoint_config(sagemaker_session, instance_type, tf_full_
8382
assert actual_training_checkpoint_config == expected_training_checkpoint_config
8483

8584

86-
@pytest.mark.gamma_dlc
8785
def test_server_side_encryption(sagemaker_session, tf_full_version):
8886
with kms_utils.bucket_with_encryption(sagemaker_session, ROLE) as (bucket_with_kms, kms_key):
8987
output_path = os.path.join(
@@ -126,7 +124,6 @@ def test_server_side_encryption(sagemaker_session, tf_full_version):
126124

127125

128126
@pytest.mark.canary_quick
129-
@pytest.mark.gamma_dlc
130127
def test_mnist_distributed(sagemaker_session, instance_type, tf_full_version):
131128
estimator = TensorFlow(
132129
entry_point=SCRIPT,
@@ -152,7 +149,6 @@ def test_mnist_distributed(sagemaker_session, instance_type, tf_full_version):
152149
)
153150

154151

155-
@pytest.mark.gamma_dlc
156152
def test_mnist_async(sagemaker_session, cpu_instance_type):
157153
estimator = TensorFlow(
158154
entry_point=SCRIPT,
@@ -195,7 +191,6 @@ def test_mnist_async(sagemaker_session, cpu_instance_type):
195191
_assert_model_name_match(sagemaker_session.sagemaker_client, endpoint_name, model_name)
196192

197193

198-
@pytest.mark.gamma_dlc
199194
def test_deploy_with_input_handlers(sagemaker_session, instance_type, tf_full_version):
200195
estimator = TensorFlow(
201196
entry_point="training.py",

tests/integ/test_tfs.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ def tfs_predictor_with_accelerator(sagemaker_session, tf_full_version, cpu_insta
131131

132132

133133
@pytest.mark.canary_quick
134-
@pytest.mark.gamma_dlc
135134
def test_predict(tfs_predictor): # pylint: disable=W0613
136135
input_data = {"instances": [1.0, 2.0, 5.0]}
137136
expected_result = {"predictions": [3.5, 4.0, 5.5]}
@@ -140,7 +139,6 @@ def test_predict(tfs_predictor): # pylint: disable=W0613
140139
assert expected_result == result
141140

142141

143-
@pytest.mark.gamma_dlc
144142
@pytest.mark.skipif(
145143
tests.integ.test_region() not in tests.integ.EI_SUPPORTED_REGIONS,
146144
reason="EI is not supported in region {}".format(tests.integ.test_region()),
@@ -174,7 +172,6 @@ def test_predict_with_model_and_entry_point_and_dependencies_separated(
174172
assert expected_result == result
175173

176174

177-
@pytest.mark.gamma_dlc
178175
def test_predict_generic_json(tfs_predictor):
179176
input_data = [[1.0, 2.0, 5.0], [1.0, 2.0, 5.0]]
180177
expected_result = {"predictions": [[3.5, 4.0, 5.5], [3.5, 4.0, 5.5]]}
@@ -183,7 +180,6 @@ def test_predict_generic_json(tfs_predictor):
183180
assert expected_result == result
184181

185182

186-
@pytest.mark.gamma_dlc
187183
def test_predict_jsons_json_content_type(tfs_predictor):
188184
input_data = "[1.0, 2.0, 5.0]\n[1.0, 2.0, 5.0]"
189185
expected_result = {"predictions": [[3.5, 4.0, 5.5], [3.5, 4.0, 5.5]]}
@@ -201,7 +197,6 @@ def test_predict_jsons_json_content_type(tfs_predictor):
201197
assert expected_result == result
202198

203199

204-
@pytest.mark.gamma_dlc
205200
def test_predict_jsons(tfs_predictor):
206201
input_data = "[1.0, 2.0, 5.0]\n[1.0, 2.0, 5.0]"
207202
expected_result = {"predictions": [[3.5, 4.0, 5.5], [3.5, 4.0, 5.5]]}
@@ -219,7 +214,6 @@ def test_predict_jsons(tfs_predictor):
219214
assert expected_result == result
220215

221216

222-
@pytest.mark.gamma_dlc
223217
def test_predict_jsonlines(tfs_predictor):
224218
input_data = "[1.0, 2.0, 5.0]\n[1.0, 2.0, 5.0]"
225219
expected_result = {"predictions": [[3.5, 4.0, 5.5], [3.5, 4.0, 5.5]]}
@@ -237,7 +231,6 @@ def test_predict_jsonlines(tfs_predictor):
237231
assert expected_result == result
238232

239233

240-
@pytest.mark.gamma_dlc
241234
def test_predict_csv(tfs_predictor):
242235
input_data = "1.0,2.0,5.0\n1.0,2.0,5.0"
243236
expected_result = {"predictions": [[3.5, 4.0, 5.5], [3.5, 4.0, 5.5]]}
@@ -252,7 +245,6 @@ def test_predict_csv(tfs_predictor):
252245
assert expected_result == result
253246

254247

255-
@pytest.mark.gamma_dlc
256248
def test_predict_bad_input(tfs_predictor):
257249
input_data = {"junk": "data"}
258250
with pytest.raises(botocore.exceptions.ClientError):

tox.ini

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# and then run "tox" from this directory.
55

66
[tox]
7-
envlist = black-format,flake8,pylint,twine,sphinx,py27,py36,gamma-py2,gamma-py3
7+
envlist = black-format,flake8,pylint,twine,sphinx,py27,py36
88

99
skip_missing_interpreters = False
1010

@@ -128,24 +128,3 @@ basepython = python3
128128
deps = black==19.3b0
129129
commands =
130130
black -l 100 --check ./
131-
132-
[testenv:gamma-py3]
133-
basepython = python3
134-
# Used for testing DLC frameworks gamma containers
135-
setenv =
136-
DLC_GAMMA_TESTING = 1
137-
# {posargs} can be passed in by additional arguments specified when invoking tox.
138-
# Can be used to specify which tests to run, e.g.: tox -- -s
139-
commands =
140-
pytest -m "gamma_dlc" {posargs}
141-
142-
143-
[testenv:gamma-py2]
144-
basepython = python2
145-
# Used for testing DLC frameworks gamma containers
146-
setenv =
147-
DLC_GAMMA_TESTING = 1
148-
# {posargs} can be passed in by additional arguments specified when invoking tox.
149-
# Can be used to specify which tests to run, e.g.: tox -- -s
150-
commands =
151-
pytest -m "gamma_dlc" {posargs}

0 commit comments

Comments
 (0)