KingNish commited on
Commit
e698ae3
·
verified ·
1 Parent(s): 6ceb788

Delete scripts

Browse files
scripts/eval/eval_vlm.sh DELETED
@@ -1,27 +0,0 @@
1
- # Copyright 2025 Bytedance Ltd. and/or its affiliates.
2
- # SPDX-License-Identifier: Apache-2.0
3
-
4
- # Check if enough arguments are provided
5
- if [ $# -lt 2 ]; then
6
- echo "Error: PREFIX_DIR and MODEL_PATH are required as the first and second arguments respectively."
7
- exit 1
8
- fi
9
-
10
- LOG_PATH=$1
11
- if [ ! -d "$LOG_PATH" ]; then
12
- mkdir -p "$LOG_PATH"
13
- fi
14
- shift 1
15
- ARGS=("$@")
16
- export MASTER_PORT=10042
17
-
18
- FULL_MODEL_PATH="$PREFIX_DIR/$MODEL_PATH"
19
-
20
- IFS=' ' read -r -a DATASETS <<< "$DATASETS_STR"
21
-
22
- for DATASET in "${DATASETS[@]}"; do
23
- bash eval/vlm/evaluate.sh \
24
- "$DATASET" \
25
- --out-dir "$LOG_PATH/$DATASET" \
26
- "${ARGS[@]}"
27
- done
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
scripts/eval/run_eval_vlm.sh DELETED
@@ -1,19 +0,0 @@
1
- # Copyright 2025 Bytedance Ltd. and/or its affiliates.
2
- # SPDX-License-Identifier: Apache-2.0
3
-
4
- set -x
5
-
6
- # Set proxy and API key
7
- export OPENAI_API_KEY=$openai_api_key
8
-
9
- export GPUS=1
10
-
11
- DATASETS=("mme" "mmbench-dev-en" "mmvet" "mmmu-val" "mathvista-testmini" "mmvp")
12
- # DATASETS=("mmmu-val_cot")
13
-
14
- DATASETS_STR="${DATASETS[*]}"
15
- export DATASETS_STR
16
-
17
- bash scripts/eval/eval_vlm.sh \
18
- $output_path \
19
- --model-path $model_path
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
scripts/eval/run_geneval.sh DELETED
@@ -1,40 +0,0 @@
1
- # Copyright 2025 Bytedance Ltd. and/or its affiliates.
2
- # SPDX-License-Identifier: Apache-2.0
3
-
4
- set -x
5
-
6
- GPUS=8
7
-
8
- # generate images
9
- torchrun \
10
- --nnodes=1 \
11
- --node_rank=0 \
12
- --nproc_per_node=$GPUS \
13
- --master_addr=127.0.0.1 \
14
- --master_port=12345 \
15
- ./eval/gen/gen_images_mp.py \
16
- --output_dir $output_path/images \
17
- --metadata_file ./eval/gen/geneval/prompts/evaluation_metadata_long.jsonl \
18
- --batch_size 1 \
19
- --num_images 4 \
20
- --resolution 1024 \
21
- --max_latent_size 64 \
22
- --model-path $model_path \
23
- # --metadata_file ./eval/gen/geneval/prompts/evaluation_metadata.jsonl \
24
-
25
-
26
- # calculate score
27
- torchrun \
28
- --nnodes=1 \
29
- --node_rank=0 \
30
- --nproc_per_node=$GPUS \
31
- --master_addr=127.0.0.1 \
32
- --master_port=12345 \
33
- ./eval/gen/geneval/evaluation/evaluate_images_mp.py \
34
- $OUTPUT_DIR/images \
35
- --outfile $OUTPUT_DIR/results.jsonl \
36
- --model-path ./eval/gen/geneval/model
37
-
38
-
39
- # summarize score
40
- python ./eval/gen/geneval/evaluation/summary_scores.py $OUTPUT_DIR/results.jsonl
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
scripts/eval/run_wise.sh DELETED
@@ -1,44 +0,0 @@
1
- # Copyright 2025 Bytedance Ltd. and/or its affiliates.
2
- # SPDX-License-Identifier: Apache-2.0
3
-
4
- set -x
5
-
6
- export OPENAI_API_KEY=$openai_api_key
7
-
8
- GPUS=8
9
-
10
-
11
- # generate images
12
- torchrun \
13
- --nnodes=1 \
14
- --node_rank=0 \
15
- --nproc_per_node=$GPUS \
16
- --master_addr=127.0.0.1 \
17
- --master_port=12345 \
18
- ./eval/gen/gen_images_mp_wise.py \
19
- --output_dir $output_path/images \
20
- --metadata-file ./eval/gen/wise/final_data.json \
21
- --resolution 1024 \
22
- --max-latent_size 64 \
23
- --model-path $model_path \
24
- --think
25
-
26
-
27
- # calculate score
28
- python3 eval/gen/wise/gpt_eval_mp.py \
29
- --json_path eval/gen/wise/data/cultural_common_sense.json \
30
- --image_dir $output_path/images \
31
- --output_dir $output_path
32
-
33
- python3 eval/gen/wise/gpt_eval_mp.py \
34
- --json_path eval/gen/wise/data/spatio-temporal_reasoning.json \
35
- --image_dir $output_path/images \
36
- --output_dir $output_path
37
-
38
- python3 eval/gen/wise/gpt_eval_mp.py \
39
- --json_path eval/gen/wise/data/natural_science.json \
40
- --image_dir $output_path/images \
41
- --output_dir $output_path
42
-
43
- python3 eval/gen/wise/cal_score.py \
44
- --output_dir $output_path
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
scripts/train.sh DELETED
@@ -1,21 +0,0 @@
1
- # Copyright 2025 Bytedance Ltd. and/or its affiliates.
2
- # SPDX-License-Identifier: Apache-2.0
3
-
4
- # replace the variables with your own
5
- torchrun \
6
- --nnodes=$num_nodes \
7
- --node_rank=$node_rank \
8
- --nproc_per_node=8 \
9
- --master_addr=$master_addr \
10
- --master_port=$master_port \
11
- train/pretrain_unified_navit.py \
12
- --dataset_config_file ./data/configs/example.yaml \
13
- --llm_path $llm_path \
14
- --vae_path $vae_path \
15
- --vit_path $vit_path \
16
- --use_flex True \
17
- --resume_from $resume_from \
18
- --results_dir $output_path \
19
- --checkpoint_dir $ckpt_path \
20
- --max_latent_size 64 \
21
- --num_workers 1 # use small num_workers since the num_used_data (10) are not enough to split