Skip to content

Update Sagemaker Neo Notebooks examples to PyTorch 1.6 #2018

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 1 commit into from
Feb 23, 2021
Merged

Update Sagemaker Neo Notebooks examples to PyTorch 1.6 #2018

merged 1 commit into from
Feb 23, 2021

Conversation

prateekch91
Copy link
Contributor

Issue #, if available: N/A

Description of changes:
Amazon Sagemaker Neo has recently released new optimized neo inference containers for PyTorch 1.5 and 1.6. This PR includes compilation example changes demonstrating the usage of these new containers for PyTorch.

Two examples were changed:
ResNet18
VGG19

Testing:
Both notebooks run to completion successfully.

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

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: amazon-sagemaker-examples-pr
  • Commit ID: e27ddfc
  • Result: FAILED
  • Build Logs (available for 30 days)

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

model = model.to(device)
neopytorch.config(model_dir=model_dir, neo_runtime=True)
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
# The compiled model is saved as "compiled.pt"
Copy link
Contributor

Choose a reason for hiding this comment

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

Fix the comment - it says compiled.pt when the name used is model.pth

@hongshanli23 hongshanli23 merged commit f8feda2 into aws:master Feb 23, 2021
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