Skip to content

Commit

Permalink
[Fix]: Refine mim_slurm_test.sh (#477)
Browse files Browse the repository at this point in the history
* [Fix]: Refine mim_slurm_test.sh

* [Feature]: Add cfg-options

* [Fix]: classification/mim_dist_test.sh
  • Loading branch information
YuanLiuuuuuu authored and fangyixiao18 committed Oct 12, 2022
1 parent 088d4c8 commit dee5b68
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tools/benchmarks/classification/mim_dist_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ mim test mmcls \
--checkpoint $CHECKPOINT \
--launcher pytorch \
-G $GPUS \
$PY_ARGS
--cfg-options $PY_ARGS
7 changes: 3 additions & 4 deletions tools/benchmarks/classification/mim_slurm_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,19 @@ set -x

PARTITION=$1
CFG=$2 # use cfgs under "configs/benchmarks/classification/imagenet/*.py"
CHECKPOINT=$3
CHECKPOINT=$3 # pretrained model
GPUS=${GPUS:-8}
GPUS_PER_NODE=${GPUS_PER_NODE:-8}
CPUS_PER_TASK=${CPUS_PER_TASK:-5}
SRUN_ARGS=${SRUN_ARGS:-""}
PY_ARGS=${@:4}

PYTHONPATH="$(dirname $0)/..":$PYTHONPATH \
mim test mmcls \
$CFG \
mim test mmcls $CFG \
--checkpoint $CHECKPOINT \
--launcher slurm -G $GPUS \
--gpus-per-node $GPUS_PER_NODE \
--cpus-per-task $CPUS_PER_TASK \
--partition $PARTITION \
--srun-args "$SRUN_ARGS" \
$PY_ARGS
--cfg-options $PY_ARGS \
2 changes: 1 addition & 1 deletion tools/benchmarks/mmdetection/mim_dist_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ mim test mmdet \
--launcher pytorch \
-G $GPUS \
--work-dir $WORK_DIR \
$PY_ARGS
--cfg-options $PY_ARGS
2 changes: 1 addition & 1 deletion tools/benchmarks/mmdetection/mim_slurm_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ mim test mmdet \
--partition $PARTITION \
--work-dir $WORK_DIR \
--srun-args "$SRUN_ARGS" \
$PY_ARGS
--cfg-options $PY_ARGS
2 changes: 1 addition & 1 deletion tools/benchmarks/mmsegmentation/mim_dist_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ mim test mmseg \
--launcher pytorch \
-G $GPUS \
--work-dir $WORK_DIR \
$PY_ARGS
--cfg-options $PY_ARGS
2 changes: 1 addition & 1 deletion tools/benchmarks/mmsegmentation/mim_slurm_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ mim test mmseg \
--partition $PARTITION \
--work-dir $WORK_DIR \
--srun-args "$SRUN_ARGS" \
$PY_ARGS
--cfg-options $PY_ARGS

0 comments on commit dee5b68

Please sign in to comment.