Spaces:
Sleeping
Sleeping
fix: move Optional import to top of feature_engineer.py
Browse files
app/services/feature_engineer.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
"""Feature engineering for TFT stock price prediction."""
|
| 2 |
import numpy as np
|
| 3 |
import pandas as pd
|
| 4 |
-
from typing import Tuple
|
| 5 |
|
| 6 |
|
| 7 |
SEQUENCE_LEN = 60 # lookback window (TFT benefits from longer context)
|
|
@@ -128,9 +128,6 @@ def build_features(
|
|
| 128 |
return features.astype(np.float32)
|
| 129 |
|
| 130 |
|
| 131 |
-
# Optional type hint (Python 3.10+)
|
| 132 |
-
from typing import Optional
|
| 133 |
-
|
| 134 |
|
| 135 |
def make_sequences(
|
| 136 |
features: np.ndarray,
|
|
|
|
| 1 |
"""Feature engineering for TFT stock price prediction."""
|
| 2 |
import numpy as np
|
| 3 |
import pandas as pd
|
| 4 |
+
from typing import Optional, Tuple
|
| 5 |
|
| 6 |
|
| 7 |
SEQUENCE_LEN = 60 # lookback window (TFT benefits from longer context)
|
|
|
|
| 128 |
return features.astype(np.float32)
|
| 129 |
|
| 130 |
|
|
|
|
|
|
|
|
|
|
| 131 |
|
| 132 |
def make_sequences(
|
| 133 |
features: np.ndarray,
|