From acd9abc5cad92823fba6916bb08662081f227da3 Mon Sep 17 00:00:00 2001 From: Frank Lee Date: Sat, 12 Nov 2022 16:55:19 +0800 Subject: [PATCH] [tutorial] updated auto parallel demo with latest data path (#1917) --- examples/tutorial/auto_parallel/README.md | 5 +++-- .../{demo_gpt2_medium.py => auto_ckpt_with_gpt2_medium.py} | 0 .../{demo_resnet152.py => auto_ckpt_with_resnet152.py} | 0 .../{demo_resnet50.py => auto_ckpt_with_resnet50.py} | 0 .../{auto_parallel_demo.py => auto_parallel_with_resnet.py} | 2 +- 5 files changed, 4 insertions(+), 3 deletions(-) rename examples/tutorial/auto_parallel/{demo_gpt2_medium.py => auto_ckpt_with_gpt2_medium.py} (100%) rename examples/tutorial/auto_parallel/{demo_resnet152.py => auto_ckpt_with_resnet152.py} (100%) rename examples/tutorial/auto_parallel/{demo_resnet50.py => auto_ckpt_with_resnet50.py} (100%) rename examples/tutorial/auto_parallel/{auto_parallel_demo.py => auto_parallel_with_resnet.py} (98%) diff --git a/examples/tutorial/auto_parallel/README.md b/examples/tutorial/auto_parallel/README.md index 36c278491..57928f832 100644 --- a/examples/tutorial/auto_parallel/README.md +++ b/examples/tutorial/auto_parallel/README.md @@ -2,7 +2,8 @@ ## Prepare Dataset -We use CIFAR10 dataset in this example. The dataset will be downloaded to `./data` by default. +We use CIFAR10 dataset in this example. You should invoke the `donwload_cifar10.py` in the tutorial root directory or directly run the `auto_parallel_with_resnet.py`. +The dataset will be downloaded to `colossalai/examples/tutorials/data` by default. If you wish to use customized directory for the dataset. You can set the environment variable `DATA` via the following command. ```bash @@ -13,7 +14,7 @@ export DATA=/path/to/data ## Run on 2*2 device mesh ```bash -colossalai run --nproc_per_node 4 auto_parallel_demo.py +colossalai run --nproc_per_node 4 auto_parallel_with_resnet.py ``` ## Auto Checkpoint Benchmarking diff --git a/examples/tutorial/auto_parallel/demo_gpt2_medium.py b/examples/tutorial/auto_parallel/auto_ckpt_with_gpt2_medium.py similarity index 100% rename from examples/tutorial/auto_parallel/demo_gpt2_medium.py rename to examples/tutorial/auto_parallel/auto_ckpt_with_gpt2_medium.py diff --git a/examples/tutorial/auto_parallel/demo_resnet152.py b/examples/tutorial/auto_parallel/auto_ckpt_with_resnet152.py similarity index 100% rename from examples/tutorial/auto_parallel/demo_resnet152.py rename to examples/tutorial/auto_parallel/auto_ckpt_with_resnet152.py diff --git a/examples/tutorial/auto_parallel/demo_resnet50.py b/examples/tutorial/auto_parallel/auto_ckpt_with_resnet50.py similarity index 100% rename from examples/tutorial/auto_parallel/demo_resnet50.py rename to examples/tutorial/auto_parallel/auto_ckpt_with_resnet50.py diff --git a/examples/tutorial/auto_parallel/auto_parallel_demo.py b/examples/tutorial/auto_parallel/auto_parallel_with_resnet.py similarity index 98% rename from examples/tutorial/auto_parallel/auto_parallel_demo.py rename to examples/tutorial/auto_parallel/auto_parallel_with_resnet.py index f38fbe2d5..534d2d0af 100644 --- a/examples/tutorial/auto_parallel/auto_parallel_demo.py +++ b/examples/tutorial/auto_parallel/auto_parallel_with_resnet.py @@ -24,7 +24,7 @@ from colossalai.logging import get_dist_logger from colossalai.nn.lr_scheduler import CosineAnnealingLR from colossalai.utils import get_dataloader -DATA_ROOT = Path(os.environ.get('DATA', './data')) +DATA_ROOT = Path(os.environ.get('DATA', '../data')).absolute() BATCH_SIZE = 1024 NUM_EPOCHS = 10