#!/bin/bash
#SBATCH -t 5-00:00:00
#SBATCH --gres=gpu:1
#SBATCH -n8
#SBATCH --constraint=gpu80
#SBATCH -p highgpu
#SBATCH --job-name=breakfast-base-8-98
#SBATCH --mem-per-cpu=20G
#SBATCH --output=./logs/%x.out

#[96, 112, 128, 160, 192, 224, 288, 384, 448])    #, 512, 640]

# Load modules
module list                            # Have Nvidia tell us the GPU/CPU mapping so we know
nvidia-smi topo -m
source activate /home/ny525072/anaconda3/envs/mamba
export DECORD_EOF_RETRY_MAX=1310720
echo $DECORD_EOF_RETRY_MAX


JOB_NAME="${SLURM_JOB_NAME:-}"
if [[ "$JOB_NAME" =~ ([0-9]+)-([0-9]+)$ ]]; then
  FRAMES="${BASH_REMATCH[1]}"
  RESOLUTION="${BASH_REMATCH[2]}"
fi


dataset='breakfast' # change in timesformer
#FRAMES=16
#RESOLUTION=112
echo "Parsed from job name -> frames=$FRAMES, resolution=$RESOLUTION"
# '/home/ny525072/VideoMamba/videomamba/video_sm/TimeSformer/TimeSformer_divST_8x32_224_K400.pyth'
# "/home/ny525072/VideoMamba/videomamba/video_sm/TimeSformer/checkpoints/checkpoint_epoch_00012.pyth"


#python tools/run_net.py --cfg configs/Kinetics/TimeSformer_divST_8x32_224.yaml DATA.PATH_TO_DATA_DIR /home/c3-0/datasets/kinetics400_dataset OUTPUT_DIR . NUM_GPUS 1
python tools/run_net.py --cfg configs/Kinetics/TimeSformer_divST_8x32_224_TEST.yaml DATA.PATH_TO_DATA_DIR /home/c3-0/datasets/kinetics400_dataset OUTPUT_DIR . NUM_GPUS 1 DATA.TRAIN_CROP_SIZE $RESOLUTION DATA.NUM_FRAMES $FRAMES TEST.CHECKPOINT_FILE_PATH '/home/ny525072/VideoMamba/videomamba/video_sm/TimeSformer/TimeSformer_divST_8x32_224_K400.pyth'