mirror of
https://github.com/open-mmlab/mmselfsup.git
synced 2025-06-03 14:59:38 +08:00
* [Fix]: Refine mim_slurm_test.sh * [Feature]: Add cfg-options * [Fix]: classification/mim_dist_test.sh
23 lines
570 B
Bash
23 lines
570 B
Bash
#!/usr/bin/env bash
|
|
|
|
set -x
|
|
|
|
PARTITION=$1
|
|
CFG=$2 # use cfgs under "configs/benchmarks/classification/imagenet/*.py"
|
|
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 \
|
|
--checkpoint $CHECKPOINT \
|
|
--launcher slurm -G $GPUS \
|
|
--gpus-per-node $GPUS_PER_NODE \
|
|
--cpus-per-task $CPUS_PER_TASK \
|
|
--partition $PARTITION \
|
|
--srun-args "$SRUN_ARGS" \
|
|
--cfg-options $PY_ARGS \
|