Skip to content

Commit f5725f0

Browse files
authored
improve run.sh script with comments to better show the whole process off generating the score on benchmark (#44)
1 parent 0fa7515 commit f5725f0

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

run.sh

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
docker pull [image_id]
77
88
1.a.1. If use a GPU:
9-
docker run -it --gpus device=0 -v [repo path]:/codabench [image_id] /bin/bash
9+
docker run -it --gpus device=0 -v [repo_path]:/codabench [image_id] /bin/bash
1010
1.a.2. If only use CPU:
11-
docker run -it -v [repo path]:/codabench [image_id] /bin/bash
11+
docker run -it -v [repo_path]:/codabench [image_id] /bin/bash
1212
1313
cd codabench
1414
@@ -34,12 +34,12 @@ export baseline_model="bioclip"
3434
export task_folder="${data_split}_${baseline_model}"
3535

3636

37-
## create folder structure
37+
# Create folder structure
3838
if [[ "$task_type" == *"folder"* ]]; then
3939
mkdir -p sample_result_submission/$task_folder/ref
4040
mkdir -p sample_result_submission/$task_folder/res
41-
export ref_path="/home/wu.5686/imageo/challenge/reference_data/ref_$data_split.csv"
42-
cp $ref_path sample_result_submission/$task_folder/ref
41+
export ref_path="[the path of folder you put the simulated ground truth csv file]/ref_$data_split.csv"
42+
cp $ref_path sample_result_submission/$task_folder/ref # Put the simulated ground truth csv file in the ref folder.
4343
fi
4444

4545
: <<'END_COMMENT'
@@ -51,11 +51,10 @@ sample_result_submission
5151
-- res
5252
END_COMMENT
5353

54-
## get the predictions
54+
# Get the predictions
5555
if [[ "$task_type" == *"predict"* ]]; then
56-
export input_dir="input_data/$data_split"
57-
# export input_dir="/local/scratch/wu.5686/anomaly_challenge/input_data/$data_split"
58-
export output_dir="sample_result_submission/$task_folder/res"
56+
export input_dir="input_data/$data_split" # This is the directory you put the images in.
57+
export output_dir="sample_result_submission/$task_folder/res" # The prediction file will output to this directory.
5958
export program_dir="ingestion_program"
6059
if [ "$baseline_model" == "bioclip" ]; then
6160
export submission_dir="baselines/BioCLIP_code_submission"
@@ -69,7 +68,7 @@ if [[ "$task_type" == *"predict"* ]]; then
6968
python3 ingestion_program/ingestion.py $input_dir $output_dir $program_dir $submission_dir
7069
fi
7170

72-
## score the predictions
71+
# Score the predictions
7372
if [[ "$task_type" == *"evaluate"* ]]; then
7473
export input_dir="sample_result_submission/$task_folder"
7574
export output_dir="sample_result_submission/$task_folder"

0 commit comments

Comments
 (0)