Team Ai
Apppublic

MLVLab/Human_Object_Interaction

sourceHugging Faceapache-2.0updated 3y agoView on Hugging Face
1likes
run_dist_slurm.sh34 linesDownload Raw Back to tools
1#!/usr/bin/env bash2# --------------------------------------------------------------------------------------------------------------------------3# Deformable DETR4# Copyright (c) 2020 SenseTime. All Rights Reserved.5# Licensed under the Apache License, Version 2.0 [see LICENSE for details]6# --------------------------------------------------------------------------------------------------------------------------7# Modified from https://github.com/open-mmlab/mmdetection/blob/3b53fe15d87860c6941f3dda63c0f27422da6266/tools/slurm_train.sh8# --------------------------------------------------------------------------------------------------------------------------9 10set -x11 12PARTITION=$113JOB_NAME=$214GPUS=$315RUN_COMMAND=${@:4}16if [ $GPUS -lt 8 ]; then17    GPUS_PER_NODE=${GPUS_PER_NODE:-$GPUS}18else19    GPUS_PER_NODE=${GPUS_PER_NODE:-8}20fi21CPUS_PER_TASK=${CPUS_PER_TASK:-4}22SRUN_ARGS=${SRUN_ARGS:-""}23 24srun -p ${PARTITION} \25    --job-name=${JOB_NAME} \26    --gres=gpu:${GPUS_PER_NODE} \27    --ntasks=${GPUS} \28    --ntasks-per-node=${GPUS_PER_NODE} \29    --cpus-per-task=${CPUS_PER_TASK} \30    --kill-on-bad-exit=1 \31    ${SRUN_ARGS} \32    ${RUN_COMMAND}33 34