-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path7-finetuning.sh
More file actions
executable file
·39 lines (30 loc) · 1.08 KB
/
7-finetuning.sh
File metadata and controls
executable file
·39 lines (30 loc) · 1.08 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
#!/usr/bin/env bash
set -euo pipefail
EXPERIMENT_CONFIG="7_finetuning_latn.yaml"
MLFLOW_PORT="${MLFLOW_PORT:-5002}"
MLFLOW_BACKEND_URI="${MLFLOW_BACKEND_URI:-sqlite:///mlruns/mlruns.db}"
MLFLOW_ARTIFACT_ROOT="${MLFLOW_ARTIFACT_ROOT:-file:mlruns}"
MLFLOW_TRACKING_URI="http://127.0.0.1:${MLFLOW_PORT}"
export HYDRA_FULL_ERROR=1
cleanup() {
echo "Stopping MLflow server..."
if [[ -n "${MLFLOW_PID:-}" ]]; then
kill "$MLFLOW_PID" 2>/dev/null || true
fi
}
trap cleanup EXIT INT TERM
echo "Starting MLflow server..."
mlflow server \
--backend-store-uri "$MLFLOW_BACKEND_URI" \
--default-artifact-root "$MLFLOW_ARTIFACT_ROOT" \
--host 0.0.0.0 \
--port "$MLFLOW_PORT" \
>/tmp/mlflow.log 2>&1 &
MLFLOW_PID=$!
echo "Waiting for MLflow server to be ready..."
until curl -s "http://127.0.0.1:${MLFLOW_PORT}" >/dev/null; do
sleep 0.5
done
echo "MLflow server running at ${MLFLOW_TRACKING_URI} (PID=${MLFLOW_PID}) logs in /tmp/mlflow.log"
echo "Launching runexp config: ${EXPERIMENT_CONFIG}"
python -m runexp -cn "${EXPERIMENT_CONFIG}" "run_args.tracker.tracking_uri=${MLFLOW_TRACKING_URI}"