Skip to content

Commit d91ce31

Browse files
author
Balaji Veeramani
committed
Fix integration tests
1 parent 6d84df9 commit d91ce31

File tree

4 files changed

+5
-1
lines changed

4 files changed

+5
-1
lines changed

tests/integ/test_byo_estimator.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ def test_byo_estimator(sagemaker_session, region, cpu_instance_type, training_se
9191
predictor = model.deploy(1, cpu_instance_type, endpoint_name=job_name)
9292
predictor.serializer = _FactorizationMachineSerializer()
9393
predictor.deserializer = sagemaker.deserializers.JSONDeserializer()
94+
predictor.content_type = "application/json"
9495

9596
result = predictor.predict(training_set[0][:10])
9697

@@ -136,6 +137,7 @@ def test_async_byo_estimator(sagemaker_session, region, cpu_instance_type, train
136137
predictor = model.deploy(1, cpu_instance_type, endpoint_name=endpoint_name)
137138
predictor.serializer = _FactorizationMachineSerializer()
138139
predictor.deserializer = sagemaker.deserializers.JSONDeserializer()
140+
predictor.content_type = "application/json"
139141

140142
result = predictor.predict(training_set[0][:10])
141143

tests/integ/test_tfs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def test_predict_jsonlines(tfs_predictor):
221221
predictor = sagemaker.Predictor(
222222
tfs_predictor.endpoint_name,
223223
tfs_predictor.sagemaker_session,
224-
serializer=JSONLinesSerializer(),
224+
serializer=IdentitySerializer(content_type="application/jsonlines"),
225225
deserializer=JSONLinesDeserializer(),
226226
)
227227

tests/integ/test_tuner.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -903,6 +903,7 @@ def test_tuning_byo_estimator(sagemaker_session, cpu_instance_type):
903903
predictor = tuner.deploy(1, cpu_instance_type, endpoint_name=best_training_job)
904904
predictor.serializer = _FactorizationMachineSerializer()
905905
predictor.deserializer = JSONDeserializer()
906+
predictor.content_type = "application/json"
906907

907908
result = predictor.predict(datasets.one_p_mnist()[0][:10])
908909

tests/integ/test_tuner_multi_algo.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ def _deploy_and_predict(sagemaker_session, tuner, data_set, cpu_instance_type):
190190
)
191191
)
192192
predictor = tuner.deploy(1, cpu_instance_type, endpoint_name=best_training_job)
193+
predictor.content_type = "application/json"
193194

194195
print("Making prediction using the deployed model")
195196
data = data_set[0][:10]

0 commit comments

Comments
 (0)