| # Build K-step GUI Transition data from GUI trajectories | |
| set -e | |
| # Default values | |
| INPUT_DIR="" | |
| OUTPUT_DIR="./data/gui_transition" | |
| K_VALUES="1 2 3 4" | |
| SAMPLES_PER_K=2000 | |
| SEED=42 | |
| # Parse arguments | |
| while [[ $# -gt 0 ]]; do | |
| case $1 in | |
| --input_dir) | |
| INPUT_DIR="$2" | |
| shift 2 | |
| ;; | |
| --output_dir) | |
| OUTPUT_DIR="$2" | |
| shift 2 | |
| ;; | |
| --k_values) | |
| K_VALUES="$2" | |
| shift 2 | |
| ;; | |
| --samples_per_k) | |
| SAMPLES_PER_K="$2" | |
| shift 2 | |
| ;; | |
| --seed) | |
| SEED="$2" | |
| shift 2 | |
| ;; | |
| *) | |
| echo "Unknown option: $1" | |
| exit 1 | |
| ;; | |
| esac | |
| done | |
| if [ -z "$INPUT_DIR" ]; then | |
| echo "Error: --input_dir is required" | |
| echo "Usage: bash scripts/build_data.sh --input_dir /path/to/trajectories --output_dir ./data/gui_transition" | |
| exit 1 | |
| fi | |
| echo "=== Building K-step GUI Transition Data ===" | |
| echo "Input: $INPUT_DIR" | |
| echo "Output: $OUTPUT_DIR" | |
| echo "K values: $K_VALUES" | |
| echo "Samples per K: $SAMPLES_PER_K" | |
| echo "Seed: $SEED" | |
| echo "" | |
| python src/data_construction/build_kstep_data.py \ | |
| --input_dir "$INPUT_DIR" \ | |
| --output_dir "$OUTPUT_DIR" \ | |
| --k_values $K_VALUES \ | |
| --samples_per_k "$SAMPLES_PER_K" \ | |
| --seed "$SEED" | |
| echo "" | |
| echo "Data construction complete! Output: $OUTPUT_DIR" | |