File size: 1,418 Bytes
020c401 | 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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | #!/bin/bash
# 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"
|