File size: 1,415 Bytes
7ef0503
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/bin/bash

# directory="/data/angcb/home/kpiyu/ANGCB/scripts/202506_flux_train"
# directory="/data/angcb/home/kpiyu/ANGCB/scripts/202212_flux_eval_train"
directory="/data/angcb/home/kpiyu/ANGCB/scripts/202212_fco2_eval_train"

# # Using find command to iterate over all files
# find "$directory" -type f | while read -r file; do
#   echo "Found file: $file"
#   amlt run $file --description 'angcb'
#   break
# done
  
#!/bin/bash
# [102, 104, 106, 108, 109, 110, 118, 120, 121]


find "$directory" -type f | while read -r file; do
  # Get the basename of the file
  filename=$(basename "$file")

  # # Check if the filename is 101.yaml or 102.yaml
  # if [ "$filename" == "101.yaml" ] || [ "$filename" == "102.yaml" ]; then
  #   continue
  # fi
  if [ "$filename" == "101.yaml" ]; then
    continue
  fi

  # if [ "$filename" != "120.yaml" ] && [ "$filename" != "121.yaml" ]; then
  #   continue
  # fi
  # if [ "$filename" == "102.yaml" ] || [ "$filename" == "104.yaml" ] || [ "$filename" == "106.yaml" ] || [ "$filename" == "108.yaml" ] || [ "$filename" == "109.yaml" ] || [ "$filename" == "110.yaml" ] || [ "$filename" == "118.yaml" ] || [ "$filename" == "120.yaml" ] || [ "$filename" == "121.yaml" ]; then
  #   echo $file
  # fi
  echo $file
  # amlt run "$file" --description 'angcb'
  # break
# done
done | xargs -n 1 -I {} bash -c 'amlt run "{}" --description "angcb{}"'