-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart_hf_pipeline.sh
More file actions
executable file
·31 lines (25 loc) · 1.02 KB
/
start_hf_pipeline.sh
File metadata and controls
executable file
·31 lines (25 loc) · 1.02 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
#!/bin/bash
echo "loading environment"
LOAD_ENV="module load StdEnv/2023 gcc python/3.11 opencv/4.11.0 && cd ~/links/projects/def-rrabba/aandrey/Continuously-Updating-Dataset && source .venv/bin/activate"
# Generate timestamp identifiers
TODAY=$(date +"%Y-%m-%d")
NOW=$(date +"%Y-%m-%d_%H-%M-%S")
# Create date-organized directories
mkdir -p data/slurm_logs/$TODAY
mkdir -p data/logs/pipeline/$TODAY
# Define the main coordinator log file
LOG_FILE="data/logs/pipeline/$TODAY/pipeline_$NOW.log"
# Build optional --model flag
MODEL_ARG=""
if [ -n "$1" ]; then
MODEL_ARG="--model $1"
fi
echo "========================================"
echo " Starting HF Dataset Generation Pipeline"
echo " Date: $TODAY"
echo " Main Log: $LOG_FILE"
echo " Slurm Logs: slurm_logs/$TODAY/"
[ -n "$1" ] && echo " Target Model: $1"
echo "========================================"
# Launch tmux detached, running the python script with the 2>&1 pipe
tmux new -s hugging_face "$LOAD_ENV && python -u huggingface_pipeline.py $MODEL_ARG 2>&1 | tee -a $LOG_FILE"