Skip to content

Commit

Permalink
fix: running on linux with new version of Ray
Browse files Browse the repository at this point in the history
  • Loading branch information
pierreaubert committed Dec 10, 2024
1 parent bc7540a commit c7fc4e9
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 17 deletions.
1 change: 1 addition & 0 deletions generate_peqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@ def main():
window_size = int(args["--smooth-measurements"])
current_optim_config["smooth_measurements"] = True
current_optim_config["smooth_window_size"] = window_size
current_optim_config["smooth_window_order"] = 3
if window_size < 2:
print("ERROR: window size is {} which is below 2".format(window_size))
parameter_error = True
Expand Down
60 changes: 43 additions & 17 deletions scripts/update_one_eq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,35 @@ elif test "$OS" = "Darwin"; then
IP=$(/sbin/ifconfig| grep 'inet ' | grep broadcast | cut -d ' ' -f 2 | head -1)
fi

PORT=9999
PORT=8379

start_ray()
{
# prometheus exporter
TEMP_DIR=$(pwd)/build/ray
mkdir -p ./build/ray
rm -fr /tmp/ray/
ln -s ${TEMP_DIR} /tmp
echo "Starting Ray with ${IP} at ${PORT} with tmp set to ${TEMP_DIR}"
ray start --node-ip-address=${IP} --port ${PORT} --head --dashboard-host=$IP --metrics-export-port=9101 --disable-usage-stats --temp-dir=$TEMP_DIR
ray start --node-ip-address=${IP} --port ${PORT} --head --dashboard-host=${IP} --metrics-export-port=9101 --disable-usage-stats
}

compute_eq()
{
target_dir="$(pwd)/build/eqs/$3/$2-$1"
EXTRA=""
smooth="asis"
if [ "$4" != "" ]; then
smooth="smooth"
EXTRA="${EXTRA} $4"
fi
full="pk"
if [ "$5" != "" ]; then
full="all"
EXTRA="${EXTRA} $5"
fi
target_dir="$(pwd)/build/eqs/$3/$2-$1-$smooth-$full"
mkdir -p "$target_dir"
echo ./generate_peqs.py --verbose --force --optimisation=global --max-iter=15000 --speaker="$3" --max-peq=$1 --fitness=$2 --ray-cluster=$IP:$PORT ${EXTRA} --output-dir="$target_dir"
{ ./generate_peqs.py \
--verbose \
--force \
Expand All @@ -40,8 +54,9 @@ compute_eq()
--max-peq=$1 \
--fitness=$2 \
--ray-cluster=$IP:$PORT \
${EXTRA} \
--output-dir="$target_dir" > "$target_dir.log"; \
} 2>&1 &
} 2>&1 &
}

start_ray
Expand All @@ -50,19 +65,30 @@ FAIL=0

for spk in "$@"
do
compute_eq 1 "Flat" "$spk"
compute_eq 2 "Flat" "$spk"
compute_eq 4 "Flat" "$spk"
compute_eq 5 "Flat" "$spk"
compute_eq 6 "Flat" "$spk"
compute_eq 7 "Flat" "$spk"

compute_eq 1 "Score" "$spk"
compute_eq 2 "Score" "$spk"
compute_eq 4 "Score" "$spk"
compute_eq 5 "Score" "$spk"
compute_eq 6 "Score" "$spk"
compute_eq 7 "Score" "$spk"
compute_eq 3 "Flat" "$spk" "" ""
compute_eq 4 "Flat" "$spk" "" ""
compute_eq 5 "Flat" "$spk" "" ""
compute_eq 6 "Flat" "$spk" "" ""
compute_eq 7 "Flat" "$spk" "" ""

compute_eq 3 "Score" "$spk" "" ""
compute_eq 4 "Score" "$spk" "" ""
compute_eq 5 "Score" "$spk" "" ""
compute_eq 6 "Score" "$spk" "" ""
compute_eq 7 "Score" "$spk" "" ""

compute_eq 3 "Flat" "$spk" "--smooth-measurements=7 --smooth-order=3" ""
compute_eq 4 "Flat" "$spk" "--smooth-measurements=7 --smooth-order=3" ""
compute_eq 5 "Flat" "$spk" "--smooth-measurements=7 --smooth-order=3" ""
compute_eq 6 "Flat" "$spk" "--smooth-measurements=7 --smooth-order=3" ""
compute_eq 7 "Flat" "$spk" "--smooth-measurements=7 --smooth-order=3" ""

compute_eq 3 "Score" "$spk" "--smooth-measurements=7 --smooth-order=3" ""
compute_eq 4 "Score" "$spk" "--smooth-measurements=7 --smooth-order=3" ""
compute_eq 5 "Score" "$spk" "--smooth-measurements=7 --smooth-order=3" ""
compute_eq 6 "Score" "$spk" "--smooth-measurements=7 --smooth-order=3" ""
compute_eq 7 "Score" "$spk" "--smooth-measurements=7 --smooth-order=3" ""

done

for job in $(jobs -p)
Expand Down

0 comments on commit c7fc4e9

Please sign in to comment.