forked from loladebabalola/NFL-bdb
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
81 lines (63 loc) · 2.97 KB
/
Copy pathconfig.py
File metadata and controls
81 lines (63 loc) · 2.97 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
"""
Configuration file for NFL Big Data Bowl 2026 project.
This file is a compatibility wrapper that imports from configs/default.py.
For new code, import directly from configs.default.
"""
# Import all config from the new location
from configs.default import *
# ============================================================================
# PROJECT PATHS
# ============================================================================
PROJECT_ROOT = Path(__file__).resolve().parent
DATA_DIR = PROJECT_ROOT / "data"
TRAIN_DIR = DATA_DIR / "train"
TEST_SAMPLE_DIR = DATA_DIR / "test_sample"
METADATA_DIR = DATA_DIR / "metadata"
PROCESSED_DIR = DATA_DIR / "processed"
DATA_PATH = str(DATA_DIR)
# ============================================================================
# MODEL ARCHITECTURE HYPERPARAMETERS
# ============================================================================
# Graph structure
MAX_PLAYERS = 22 # Maximum number of players in a graph
RADIUS = 20.0 # Maximum distance (yards) for edge connections in spatial graph
# Node features
NODE_DIM = 13 # Input dimension for node features (after numeric filtering)
EDGE_DIM = 4 # Edge feature dimension (distance, angle, rel_vx, rel_vy)
# Model dimensions
HIDDEN_DIM = 256 # Hidden dimension throughout the model
GRAPH_LAYERS = 3 # Number of graph attention layers
TEMPORAL_LAYERS = 4 # Number of temporal transformer layers
HEADS = 8 # Number of attention heads
DROPOUT = 0.1 # Dropout rate
# Temporal sequence
MAX_FRAMES = 100 # Maximum trajectory length (frames)
MAX_TRAJECTORY_LENGTH = MAX_FRAMES # Alias for compatibility
# ============================================================================
# TRAINING HYPERPARAMETERS
# ============================================================================
BATCH_SIZE = 32 # Batch size
LEARNING_RATE = 1e-4 # Learning rate
LR = LEARNING_RATE # Alias
EPOCHS = 100 # Number of training epochs
GRAD_CLIP_NORM = 1.0 # Gradient clipping norm
WEIGHT_DECAY = 1e-5 # Weight decay for optimizer
# Training settings
USE_AMP = True # Use Automatic Mixed Precision
DEVICE = "cuda:0" # Default device (will auto-detect GPU1 if available)
# ============================================================================
# DATA PROCESSING
# ============================================================================
# Feature engineering
INCLUDE_SELF_LOOPS = True # Include self-loops in graph construction
# ============================================================================
# LOGGING & CHECKPOINTING
# ============================================================================
LOG_INTERVAL = 10 # Log every N batches
CHECKPOINT_INTERVAL = 5 # Save checkpoint every N epochs
MODEL_DIR = PROJECT_ROOT / "models"
MODEL_DIR.mkdir(exist_ok=True)
# ============================================================================
# VALIDATION
# ============================================================================
VALIDATION_SPLIT = 0.1 # Fraction of data to use for validation