luanns commited on
Commit
020c401
·
verified ·
1 Parent(s): 8729d55

Upload scripts/build_data.sh

Browse files
Files changed (1) hide show
  1. scripts/build_data.sh +65 -0
scripts/build_data.sh ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Build K-step GUI Transition data from GUI trajectories
3
+
4
+ set -e
5
+
6
+ # Default values
7
+ INPUT_DIR=""
8
+ OUTPUT_DIR="./data/gui_transition"
9
+ K_VALUES="1 2 3 4"
10
+ SAMPLES_PER_K=2000
11
+ SEED=42
12
+
13
+ # Parse arguments
14
+ while [[ $# -gt 0 ]]; do
15
+ case $1 in
16
+ --input_dir)
17
+ INPUT_DIR="$2"
18
+ shift 2
19
+ ;;
20
+ --output_dir)
21
+ OUTPUT_DIR="$2"
22
+ shift 2
23
+ ;;
24
+ --k_values)
25
+ K_VALUES="$2"
26
+ shift 2
27
+ ;;
28
+ --samples_per_k)
29
+ SAMPLES_PER_K="$2"
30
+ shift 2
31
+ ;;
32
+ --seed)
33
+ SEED="$2"
34
+ shift 2
35
+ ;;
36
+ *)
37
+ echo "Unknown option: $1"
38
+ exit 1
39
+ ;;
40
+ esac
41
+ done
42
+
43
+ if [ -z "$INPUT_DIR" ]; then
44
+ echo "Error: --input_dir is required"
45
+ echo "Usage: bash scripts/build_data.sh --input_dir /path/to/trajectories --output_dir ./data/gui_transition"
46
+ exit 1
47
+ fi
48
+
49
+ echo "=== Building K-step GUI Transition Data ==="
50
+ echo "Input: $INPUT_DIR"
51
+ echo "Output: $OUTPUT_DIR"
52
+ echo "K values: $K_VALUES"
53
+ echo "Samples per K: $SAMPLES_PER_K"
54
+ echo "Seed: $SEED"
55
+ echo ""
56
+
57
+ python src/data_construction/build_kstep_data.py \
58
+ --input_dir "$INPUT_DIR" \
59
+ --output_dir "$OUTPUT_DIR" \
60
+ --k_values $K_VALUES \
61
+ --samples_per_k "$SAMPLES_PER_K" \
62
+ --seed "$SEED"
63
+
64
+ echo ""
65
+ echo "Data construction complete! Output: $OUTPUT_DIR"