-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_pipeline.sh
More file actions
executable file
·41 lines (33 loc) · 895 Bytes
/
run_pipeline.sh
File metadata and controls
executable file
·41 lines (33 loc) · 895 Bytes
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
set -e
cd "$(dirname "${BASH_SOURCE[0]}")"
CHANNEL_MODE=false
while [[ $# -gt 0 ]]; do
case $1 in
--channel) CHANNEL_MODE=true; shift ;;
*) echo "Unknown option: $1"; exit 1 ;;
esac
done
if [ "$CHANNEL_MODE" = true ]; then
TRUST_SCRIPT="generate_channel_trust.py"
JSON_SCRIPT="generate_channel_json.py"
else
TRUST_SCRIPT="generate_trust.py"
JSON_SCRIPT="generate_json.py"
fi
# Step 1: Generate trust
python3 "$TRUST_SCRIPT"
# Step 2: Run OpenRank
for trust_file in ./trust/*.csv; do
channel_id=$(basename "$trust_file" .csv)
RUST_LOG=info openrank compute-local-et \
"$trust_file" \
"./seed/${channel_id}.csv" \
--out-path="scores/${channel_id}.csv" \
--alpha=0.25 \
--delta=0.000001
done
# Step 3: Process scores
python3 process_scores.py
# Step 4: Generate JSON
python3 "$JSON_SCRIPT"