Skip to content
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

feat(sagemaker): add pytorch mnist #10354

Merged
merged 1 commit into from
Aug 13, 2023
Merged

feat(sagemaker): add pytorch mnist #10354

merged 1 commit into from
Aug 13, 2023

Conversation

hongbo-miao
Copy link
Owner

No description provided.

@hongbo-miao hongbo-miao self-assigned this Aug 13, 2023
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:13 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:13 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:13 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:13 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:13 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:13 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:13 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:13 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:13 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:13 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:13 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:13 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:13 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:13 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:13 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:13 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:13 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:13 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:13 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:13 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:13 — with GitHub Actions Inactive

def get_train_data_loader(batch_size, training_dir, is_distributed, **kwargs):
logging.info("Get train data loader")
dataset = datasets.MNIST(
Copy link

Choose a reason for hiding this comment

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

Similar blocks of code found in 2 locations. Consider refactoring.

)
test_loader = get_test_data_loader(args.test_batch_size, args.data_dir, **kwargs)

logging.info(
Copy link

Choose a reason for hiding this comment

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

Similar blocks of code found in 2 locations. Consider refactoring.


def get_test_data_loader(test_batch_size, training_dir, **kwargs):
logging.info("Get test data loader")
return torch.utils.data.DataLoader(
Copy link

Choose a reason for hiding this comment

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

Similar blocks of code found in 2 locations. Consider refactoring.

)
)

logging.info(
Copy link

Choose a reason for hiding this comment

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

Similar blocks of code found in 2 locations. Consider refactoring.

from utils.test import test


def train(args):
Copy link

Choose a reason for hiding this comment

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

Function train has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.

@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:14 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:14 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:14 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:14 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:14 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:14 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:20 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:20 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:20 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:20 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:20 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:20 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:20 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:20 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:20 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:20 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:20 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:20 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:20 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:20 — with GitHub Actions Inactive
@codeclimate
Copy link

codeclimate bot commented Aug 13, 2023

Code Climate has analyzed commit 9e540f7 and detected 5 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1
Duplication 4

View more on Code Climate.

@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:20 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:20 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:20 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:20 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:20 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:20 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:20 — with GitHub Actions Inactive
@hongbo-miao hongbo-miao temporarily deployed to test August 13, 2023 11:20 — with GitHub Actions Inactive
@sonarcloud
Copy link

sonarcloud bot commented Aug 13, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@mergify mergify bot merged commit 0668f58 into main Aug 13, 2023
75 of 76 checks passed
@mergify mergify bot deleted the sagemaker branch August 13, 2023 11:22
@sonarcloud
Copy link

sonarcloud bot commented Aug 13, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@github-actions
Copy link

🎉 This PR is included in version 1.85.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant