-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_arcane.sh
More file actions
52 lines (43 loc) · 1.6 KB
/
test_arcane.sh
File metadata and controls
52 lines (43 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash -l
# Check if conda is installed
if ! command -v conda &> /dev/null; then
echo "conda not found. Please install Miniconda or Anaconda first."
exit 1
fi
# Initialize conda
source "$(conda info --base)/etc/profile.d/conda.sh"
# Name of the environment and path to the env file
ENV_NAME="lightning-arcane-env"
ENV_FILE="environment.yml"
# Check if the environment already exists
if ! conda info --envs | grep -q "$ENV_NAME"; then
echo "Conda environment '$ENV_NAME' not found. Creating it from $ENV_FILE..."
conda env create -f "$ENV_FILE"
fi
# Activate environment
conda activate "$ENV_NAME"
#Loop through all the years between 1998 and 2023
for year in {1998..2024}; do
# Loop through all folds (0, 1, 2)
for fold in {0..2}; do
echo "###################################"
echo "###################################"
echo "Testing for year $year, fold $fold"
echo "###################################"
echo "###################################"
# Execute the Python script for each combination of year and fold
HYDRA_FULL_ERROR=1 python3 -m scripts.predict_tminus_optimized \
--config-name config_test \
+base_dataset=min10_1024 \
+boundaries=boundaries_rtsw_${year}_${fold} \
+collate_fns=standard_collates_helcats \
+samplers=imbalanced \
+callbacks=no_callbacks \
+scheduler=reduce_lr_on_plateau \
+run_name=arcane_min10_1024 \
+model=resunetplusplus_segmentation_1024 \
+module=nguyen_segmenter \
+optimizer=adam\
++base_dataset.stride=1
done
done