Skip to content

Specify named arguments for PyTorchModel in test_mnist #7

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 2 commits into from
Oct 11, 2019
Merged

Specify named arguments for PyTorchModel in test_mnist #7

merged 2 commits into from
Oct 11, 2019

Conversation

nikhil-sk
Copy link
Contributor

@nikhil-sk nikhil-sk commented Oct 10, 2019

Issue #, if available:

  1. Specify named argument for image and sagemaker_session for PyTorchModel, else it fails with:
 botocore.exceptions.ClientError: An error occurred (ValidationException) when calling the CreateModel operation: Region of "763104351884.dkr.ecr.us-west-2.amazonaws.com/pytorch-inference:1.2.0-gpu-py2" does not match expected region of us-east-1. Cross region ECR image pulls are not allowed.
  1. The sagemaker_session parameter was used in place of where the py_version was being expected, as shown here: https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/pytorch/model.py#L63

Test Results

[ec2-user@ip-172-31-30-85 sagemaker-pytorch-serving-container]$ pytest test/integration/sagemaker/test_mnist.py --aws-id 763104351884 --region us-west-2 --docker-base-name pytorch-inference --instance-type ml.p2.xlarge --framework-version 1.2.0 --processor gpu --py-version 2
============================================================ test session starts ============================================================
platform linux -- Python 3.6.8, pytest-4.4.1, py-1.8.0, pluggy-0.13.0 -- /usr/bin/python3.6
cachedir: .pytest_cache
rootdir: /home/ec2-user/sagemaker-pytorch-serving-container, inifile: setup.cfg
plugins: rerunfailures-7.0, forked-1.0.2, xdist-1.28.0, cov-2.7.1, requests-mock-1.6.0
collected 2 items                                                                                                                           

test/integration/sagemaker/test_mnist.py::test_mnist_distributed_cpu SKIPPED                                                          [ 50%]
test/integration/sagemaker/test_mnist.py::test_mnist_distributed_gpu PASSED                                                           [100%]

=================================================== 1 passed, 1 skipped in 686.71 seconds ===================================================
[ec2-user@ip-172-31-30-85 sagemaker-pytorch-serving-container]$ 

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link

@ChoiByungWook ChoiByungWook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@nikhil-sk nikhil-sk merged commit 05dd515 into aws:master Oct 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants