datamatters24 commited on
Commit
57ffff6
·
verified ·
1 Parent(s): de40ff8

Upload ml/run_pipeline.sh with huggingface_hub

Browse files
Files changed (1) hide show
  1. ml/run_pipeline.sh +34 -0
ml/run_pipeline.sh ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Run the full ML crisis correlation pipeline
3
+ # Usage: ./run_pipeline.sh
4
+ # Designed to be run inside tmux
5
+
6
+ set -euo pipefail
7
+
8
+ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
9
+ PYTHON="/opt/epstein_env/bin/python3"
10
+ LOG_DIR="/var/www/research/storage/logs"
11
+
12
+ mkdir -p "$LOG_DIR"
13
+
14
+ echo "============================================="
15
+ echo " ML Crisis Correlation Pipeline"
16
+ echo " Started: $(date)"
17
+ echo "============================================="
18
+
19
+ echo ""
20
+ echo "[Stage 1/3] Extracting document dates..."
21
+ $PYTHON "$SCRIPT_DIR/01_extract_dates.py" 2>&1 | tee "$LOG_DIR/ml_01_dates.log"
22
+
23
+ echo ""
24
+ echo "[Stage 2/3] Seeding historical events..."
25
+ $PYTHON "$SCRIPT_DIR/02_seed_events.py" 2>&1 | tee "$LOG_DIR/ml_02_events.log"
26
+
27
+ echo ""
28
+ echo "[Stage 3/3] Correlating documents with crises..."
29
+ $PYTHON "$SCRIPT_DIR/03_correlate_crises.py" 2>&1 | tee "$LOG_DIR/ml_03_correlate.log"
30
+
31
+ echo ""
32
+ echo "============================================="
33
+ echo " Pipeline complete: $(date)"
34
+ echo "============================================="