Skip to content

Commit 7a7db0a

Browse files
ajaykarpurknakad
authored andcommitted
Additional Processing Jobs integration tests (aws#245)
* Add integ test test_sklearn_with_customizations * Change the dummy script print message * Add more stringent assert statements to test_sklearn_with_customizations integration test * Add an integ test for ScriptProcessor * Change sagemaker_beta_session to sagemaker_gamma_session * Add a base_job_name to integ/test_processing::test_sklearn * Add integ tests for processors with no inputs or outputs * Remove print_response from describe * Add an integ test for Processor * Add stopping condition to test_sklearn integ test temporarily
1 parent b72fa00 commit 7a7db0a

File tree

5 files changed

+364
-18
lines changed

5 files changed

+364
-18
lines changed

src/sagemaker/processing.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -541,12 +541,9 @@ def wait(self, logs=True):
541541
else:
542542
self.sagemaker_session.wait_for_processing_job(self.job_name)
543543

544-
def describe(self, print_response=True):
544+
def describe(self):
545545
"""Prints out a response from the DescribeProcessingJob API call."""
546-
describe_response = self.sagemaker_session.describe_processing_job(self.job_name)
547-
if print_response:
548-
print(describe_response)
549-
return describe_response
546+
return self.sagemaker_session.describe_processing_job(self.job_name)
550547

551548
def stop(self):
552549
"""Stops the processing job."""

tests/conftest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,14 @@ def sagemaker_session(sagemaker_client_config, sagemaker_runtime_config, boto_co
112112
)
113113

114114

115-
# TODO-reinvent-2019: Remove this beta session entirely
115+
# TODO-reinvent-2019: Remove this gamma session entirely
116116
@pytest.fixture(scope="session")
117-
def sagemaker_beta_session(sagemaker_client_config, sagemaker_runtime_config, boto_config):
117+
def sagemaker_gamma_session(sagemaker_client_config, sagemaker_runtime_config, boto_config):
118118
boto_session = boto3.Session(region_name="us-west-2")
119119
sagemaker_client_config.setdefault("config", Config(retries=dict(max_attempts=10)))
120120
sagemaker_client_config[
121121
"endpoint_url"
122-
] = "https://sagemaker.beta.us-west-2.ml-platform.aws.a2z.com"
122+
] = "https://sagemaker.gamma.us-west-2.ml-platform.aws.a2z.com"
123123
sagemaker_client = (
124124
boto_session.client("sagemaker", **sagemaker_client_config)
125125
if sagemaker_client_config

tests/data/dummy_script.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,4 @@
1212
# language governing permissions and limitations under the License.
1313
from __future__ import absolute_import
1414

15-
print("This is definitely code which does machine learning stuff")
16-
print("and not just a random file I threw together for unit testing.")
15+
print("This is the print output from dummy_script.py.")

0 commit comments

Comments
 (0)