Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
haideraltahan committed May 13, 2024
1 parent 8864933 commit e78d8d4
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 13 deletions.
11 changes: 9 additions & 2 deletions eval_vlm/common_utils/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,16 @@
HUB_CACHE_DIR = Path.home().joinpath(".cache").joinpath("torch").joinpath("hub")
CACHE_DIR = Path.home().joinpath(".cache").joinpath("eval_vlms")
FIGURES_DIR = CACHE_DIR.joinpath("figures")
FAIR_PATHS = [
"/private/home/haideraltahan/.cache/eval_vlms/data",
"/fsx-checkpoints/haideraltahan/.cache/eval_vlm/data/"
]

FAIR_PATHS = FAIR_PATHS.filter(lambda x: os.path.exists(x))

DATA_DIR = (
"/private/home/haideraltahan/.cache/eval_vlms/data"
if os.path.exists("/private/home/haideraltahan/.cache/eval_vlms/data")
FAIR_PATHS
if os.path.exists(FAIR_PATHS)
else CACHE_DIR.joinpath("data")
)
LOCK_FILE_DIR = CACHE_DIR.joinpath("filelock")
Expand Down
13 changes: 6 additions & 7 deletions slurm_scripts/download_dataset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,17 @@
#SBATCH --nodes=1
#SBATCH --tasks-per-node=1
#SBATCH --gres=gpu:1
#SBATCH --cpus-per-task=60
#SBATCH --mem=256G
#SBATCH --time=24:00:00
#SBATCH --cpus-per-task=20
#SBATCH --mem=64G
#SBATCH --time=48:00:00
#SBATCH --output=./scripts_log/%A_%a.out
#SBATCH --partition=learnlab
#SBATCH --partition=robust

module restore conda
source /public/apps/anaconda3/2023.03-1/etc/profile.d/conda.sh
source ~/anaconda3/etc/profile.d/conda.sh
conda deactivate
conda deactivate
conda activate clip
conda activate clip
which python

eval_vlm download_datasets --dataset_id=$SLURM_ARRAY_TASK_ID
eval_vlm download_datasets --dataset_id=$SLURM_ARRAY_TASK_ID
7 changes: 3 additions & 4 deletions slurm_scripts/evaluate_xvlm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@
#SBATCH --mem=256G
#SBATCH --time=48:00:00
#SBATCH --output=./scripts_log/%A_%a.out
#SBATCH --partition=learnlab
#SBATCH --partition=robust

module restore conda
source /public/apps/anaconda3/2023.03-1/etc/profile.d/conda.sh
source ~/anaconda3/etc/profile.d/conda.sh
conda deactivate
conda deactivate
conda activate clip
conda activate clip
which python

eval_vlm evaluate --models=["xvlm_coco"]
eval_vlm evaluate --models=["eva02_vitE14_plus_2b"]
19 changes: 19 additions & 0 deletions slurm_scripts/evl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
#SBATCH --job-name=job
#SBATCH --nodes=1
#SBATCH --tasks-per-node=1
#SBATCH --gres=gpu:1
#SBATCH --cpus-per-task=20
#SBATCH --mem=256G
#SBATCH --time=48:00:00
#SBATCH --output=./scripts_log/%A_%a.out
#SBATCH --partition=robust

source ~/anaconda3/etc/profile.d/conda.sh
conda deactivate
conda deactivate
conda activate clip
conda activate clip
which python

eval_vlm evaluate --models=["eva02_vitE14_2b"]

0 comments on commit e78d8d4

Please sign in to comment.