[bug] fix get_default_parser in examples (#4764)

This commit is contained in:
Baizhou Zhang
2023-09-21 10:42:25 +08:00
committed by GitHub
parent c0a033700c
commit df66741f77
14 changed files with 36 additions and 26 deletions

View File

@@ -8,6 +8,6 @@ export PLACEMENT='cpu'
export USE_SHARD_INIT=False
export BATCH_SIZE=1
env OMP_NUM_THREADS=12 torchrun --standalone --nproc_per_node=${GPUNUM} --master_port 29501 train.py \
env OMP_NUM_THREADS=12 colossalai run --nproc_per_node ${GPUNUM} --master_port 29505 train.py \
--dummy_data=True --tp_degree=${TPDEGREE} --batch_size=${BATCH_SIZE} --plugin='gemini' \
--placement ${PLACEMENT} --shardinit ${USE_SHARD_INIT} --distplan ${DISTPAN} 2>&1 | tee run.log

View File

@@ -4,6 +4,6 @@ for BATCH_SIZE in 2
do
for GPUNUM in 1 4
do
env OMP_NUM_THREADS=12 torchrun --standalone --nproc_per_node=${GPUNUM} --standalone train.py --dummy_data=True --batch_size=${BATCH_SIZE} --plugin='gemini' 2>&1 | tee run.log
env OMP_NUM_THREADS=12 colossalai run --nproc_per_node ${GPUNUM} --master_port 29505 train.py --dummy_data=True --batch_size=${BATCH_SIZE} --plugin='gemini' 2>&1 | tee run.log
done
done

View File

@@ -1,3 +1,4 @@
import argparse
import gzip
from contextlib import nullcontext
from functools import partial
@@ -33,7 +34,7 @@ SEQ_LEN = 1024
def parse_args():
parser = colossalai.get_default_parser()
parser = argparse.ArgumentParser()
parser.add_argument(
"--distplan",
type=str,