From af9fd8b30539488e98304cf929bb8ea6f9e9c212 Mon Sep 17 00:00:00 2001 From: Sheng Zha Date: Thu, 6 Aug 2020 18:55:32 -0700 Subject: [PATCH] remove data.mxnet.io usage in tests --- .../deploy/run-on-aws/use_sagemaker.rst | 19 +++------- docs/static_site/src/pages/api/faq/cloud.md | 32 ++-------------- example/gluon/image_classification.py | 3 +- python/mxnet/test_utils.py | 20 +++++----- tests/nightly/download.sh | 38 ------------------- tests/python/gpu/test_gluon_model_zoo_gpu.py | 2 +- .../test_contrib_gluon_data_vision.py | 2 +- tests/python/unittest/test_gluon_data.py | 2 +- tests/python/unittest/test_image.py | 2 +- .../test_numpy_contrib_gluon_data_vision.py | 2 +- 10 files changed, 27 insertions(+), 95 deletions(-) delete mode 100644 tests/nightly/download.sh diff --git a/docs/python_docs/python/tutorials/deploy/run-on-aws/use_sagemaker.rst b/docs/python_docs/python/tutorials/deploy/run-on-aws/use_sagemaker.rst index d627befbd8fd..dc8052b10cdd 100644 --- a/docs/python_docs/python/tutorials/deploy/run-on-aws/use_sagemaker.rst +++ b/docs/python_docs/python/tutorials/deploy/run-on-aws/use_sagemaker.rst @@ -18,7 +18,7 @@ Run on Amazon SageMaker ----------------------- -This chapter will give a high level overview about Amazon SageMaker, +This chapter will give a high level overview about running MXNet on Amazon SageMaker, in-depth tutorials can be found on the `Sagemaker website `__. @@ -29,16 +29,7 @@ charged by time. Within this notebook you can `fetch, explore and prepare training data `__. -:: - - import mxnet as mx - import sagemaker - mx.test_utils.get_cifar10() # Downloads Cifar-10 dataset to ./data - sagemaker_session = sagemaker.Session() - inputs = sagemaker_session.upload_data(path='data/cifar', - key_prefix='data/cifar10') - -Once the data is ready, you can easily launch training via the SageMaker +With your own data on the notebook instance, you can easily launch training via the SageMaker SDK. So there is no need to manually configure and log into EC2 instances. You can either bring your own model or use SageMaker's `built-in @@ -51,11 +42,11 @@ instance: :: from sagemaker.mxnet import MXNet as MXNetEstimator - estimator = MXNetEstimator(entry_point='train.py', + estimator = MXNetEstimator(entry_point='train.py', role=sagemaker.get_execution_role(), - train_instance_count=1, + train_instance_count=1, train_instance_type='local', - hyperparameters={'batch_size': 1024, + hyperparameters={'batch_size': 1024, 'epochs': 30}) estimator.fit(inputs) diff --git a/docs/static_site/src/pages/api/faq/cloud.md b/docs/static_site/src/pages/api/faq/cloud.md index 2a5837b017eb..dd1643cb54a1 100644 --- a/docs/static_site/src/pages/api/faq/cloud.md +++ b/docs/static_site/src/pages/api/faq/cloud.md @@ -37,40 +37,16 @@ and maintain the resources for precisely the amount of time needed. In this document, we provide a step-by-step guide that will teach you how to set up an AWS cluster with _MXNet_. We show how to: -- [Use Amazon S3 to host data](#use-amazon-s3-to-host-data) -- [Set up an EC2 GPU instance with all dependencies installed](#set-up-an-ec2-gpu-instance) +- [Use Pre-installed EC2 GPU Instance](#use-pre-installed-ec2-gpu-instance) - [Build and run MXNet on a single computer](#build-and-run-mxnet-on-a-gpu-instance) - [Set up an EC2 GPU cluster for distributed training](#set-up-an-ec2-gpu-cluster-for-distributed-training) -### Use Amazon S3 to Host Data - -Amazon S3 provides distributed data storage which proves especially convenient for hosting large datasets. -To use S3, you need [AWS credentials](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSGettingStartedGuide/AWSCredentials.html), -including an `ACCESS_KEY_ID` and a `SECRET_ACCESS_KEY`. - -To use _MXNet_ with S3, set the environment variables `AWS_ACCESS_KEY_ID` and -`AWS_SECRET_ACCESS_KEY` by adding the following two lines in -`~/.bashrc` (replacing the strings with the correct ones): - -```bash -export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE -export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY -``` - -There are several ways to upload data to S3. One simple way is to use -[s3cmd](https://s3tools.org/s3cmd). For example: - -```bash -wget http://data.mxnet.io/mxnet/data/mnist.zip -unzip mnist.zip && s3cmd put t*-ubyte s3://dmlc/mnist/ -``` - ### Use Pre-installed EC2 GPU Instance The [Deep Learning AMIs](https://aws.amazon.com/marketplace/search/results?x=0&y=0&searchTerms=Deep+Learning+AMI) are a series of images supported and maintained by Amazon Web Services for use on Amazon Elastic Compute Cloud (Amazon EC2) and contain the latest MXNet release. -Now you can launch _MXNet_ directly on an EC2 GPU instance. +Now you can launch _MXNet_ directly on an EC2 GPU instance. You can also use [Jupyter](https://jupyter.org) notebook on EC2 machine. Here is a [good tutorial](https://github.com/dmlc/mxnet-notebooks) on how to connect to a Jupyter notebook running on an EC2 instance. @@ -81,7 +57,7 @@ on how to connect to a Jupyter notebook running on an EC2 instance. provide a foundational image with NVIDIA CUDA, cuDNN, GPU drivers, Intel MKL-DNN, Docker and Nvidia-Docker, etc. for deploying your own custom deep learning environment. You may follow the [MXNet Build From Source -instructions](