-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup_data.sh
More file actions
59 lines (47 loc) · 1.4 KB
/
Copy pathsetup_data.sh
File metadata and controls
59 lines (47 loc) · 1.4 KB
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
#!/bin/bash
# Download and setup Spider dataset
set -e
echo "========================================="
echo "Setting up Spider Dataset"
echo "========================================="
# Create directories
mkdir -p data
mkdir -p databases
# Download Spider dataset from official source
echo "Downloading Spider dataset from official source..."
echo "URL: https://drive.google.com/file/d/1oi9J1jZP9TyM35L85CL3qeGWl2jqlnL6"
cd data
# Use gdown for Google Drive downloads (more reliable)
if ! command -v gdown &> /dev/null; then
echo "Installing gdown for Google Drive downloads..."
pip install gdown
fi
gdown "1oi9J1jZP9TyM35L85CL3qeGWl2jqlnL6" -O spider.zip
# Extract
echo "Extracting Spider dataset..."
unzip -o -q spider.zip
# Move database folder to correct location
echo "Organizing files..."
if [ -d "database" ]; then
mv database/* ../databases/ 2>/dev/null || true
rm -rf database
fi
# Cleanup
rm -f spider.zip
cd ..
# Verify required files exist
echo "Verifying dataset files..."
if [ -f "data/dev.json" ] && [ -f "data/train_spider.json" ] && [ -f "data/tables.json" ]; then
echo "✓ Dataset files found"
else
echo "✗ Missing required dataset files"
exit 1
fi
echo ""
echo "✅ Spider dataset setup complete!"
echo ""
echo "Files created:"
echo " - data/train_spider.json"
echo " - data/dev.json"
echo " - data/tables.json"
echo " - databases/* (multiple SQLite databases)"