fix(ml): parse datetime column and fix TA-Lib pattern names
- Add parse_dates parameter when loading enriched CSV - Strip timezone from annotation timestamps to match data - Fix pattern names: CDLTHREEWHITESOLDIERS -> CDL3WHITESOLDIERS - Fix pattern names: CDLTHREEBLACKCROWS -> CDL3BLACKCROWS
This commit is contained in:
parent
2b86524436
commit
ceb4103ec4
10 changed files with 5 additions and 5 deletions
Binary file not shown.
BIN
services/ml/app/__pycache__/db.cpython-313.pyc
Normal file
BIN
services/ml/app/__pycache__/db.cpython-313.pyc
Normal file
Binary file not shown.
|
|
@ -188,8 +188,8 @@ class AnnotationIngestion:
|
|||
|
||||
for ann in annotations:
|
||||
label = ann['label']
|
||||
start_time = pd.Timestamp(ann['start_time'])
|
||||
end_time = pd.Timestamp(ann['end_time'])
|
||||
start_time = pd.Timestamp(ann['start_time']).tz_localize(None)
|
||||
end_time = pd.Timestamp(ann['end_time']).tz_localize(None)
|
||||
|
||||
# Find candles in span
|
||||
span_mask = (df['time'] >= start_time) & (df['time'] <= end_time)
|
||||
|
|
@ -504,7 +504,7 @@ def run_annotation_ingestion(
|
|||
logger.info("Running annotation ingestion stage")
|
||||
|
||||
# Load enriched data
|
||||
enriched_df = pd.read_csv(enriched_path)
|
||||
enriched_df = pd.read_csv(enriched_path, parse_dates=['time'])
|
||||
logger.info(f"Loaded enriched data: {enriched_df.shape}")
|
||||
|
||||
# Process annotations
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue