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

change: eliminate dependency on mnist dataset website #986

Merged
merged 3 commits into from
Aug 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/data/pytorch_mnist/mnist.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def _get_train_data_loader(training_dir, is_distributed, batch_size, **kwargs):
transform=transforms.Compose(
[transforms.ToTensor(), transforms.Normalize((0.1307,), (0.3081,))]
),
download=True,
download=False, # True sets a dependency on an external site for our canaries.
)
train_sampler = (
torch.utils.data.distributed.DistributedSampler(dataset) if is_distributed else None
Expand All @@ -71,7 +71,7 @@ def _get_test_data_loader(training_dir, **kwargs):
transform=transforms.Compose(
[transforms.ToTensor(), transforms.Normalize((0.1307,), (0.3081,))]
),
download=True,
download=False, # True sets a dependency on an external site for our canaries.
),
batch_size=1000,
shuffle=True,
Expand Down
4 changes: 3 additions & 1 deletion tests/integ/test_git.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
from sagemaker.sklearn.model import SKLearnModel
from tests.integ import DATA_DIR, PYTHON_VERSION

MNIST_FOLDER_NAME = "MNIST"

GIT_REPO = "https://github.com/aws/sagemaker-python-sdk.git"
BRANCH = "test-branch-git-config"
COMMIT = "ae15c9d7d5b97ea95ea451e4662ee43da3401d73"
Expand Down Expand Up @@ -69,7 +71,7 @@ def test_git_support_with_pytorch(sagemaker_local_session):
git_config=git_config,
)

pytorch.fit({"training": "file://" + os.path.join(data_path, "training")})
pytorch.fit({"training": "file://" + os.path.join(data_path, "training", MNIST_FOLDER_NAME)})

with lock.lock(LOCK_PATH):
try:
Expand Down