fix(training): use selected chart and include TA-Lib span sources

This commit is contained in:
Marko Djordjevic 2026-02-18 23:21:23 +01:00
parent 3448c6febd
commit 07064fbf40
6 changed files with 89 additions and 22 deletions

View file

@ -99,7 +99,7 @@ class AnnotationIngestion:
def load_annotations_from_db(
self,
chart_name: str,
source: str = "human"
source: Optional[str] = "human"
) -> List[Dict[str, Any]]:
"""
Load annotations directly from PostgreSQL database.
@ -108,7 +108,8 @@ class AnnotationIngestion:
Args:
chart_name: Name of the chart to load annotations for
source: Filter by annotation source ('human', 'model', 'hybrid')
source: Optional source filter (e.g. 'human', 'talib', 'model').
When None, includes all sources.
Returns:
List of annotation dictionaries compatible with existing processing
@ -545,7 +546,7 @@ class AnnotationIngestion:
self,
enriched_df: pd.DataFrame,
chart_name: str,
source: str = "human"
source: Optional[str] = "human"
) -> pd.DataFrame:
"""
Main processing pipeline using direct database access.
@ -555,7 +556,8 @@ class AnnotationIngestion:
Args:
enriched_df: DataFrame with engineered features
chart_name: Name of the chart to load annotations for
source: Filter by annotation source ('human', 'model', 'hybrid')
source: Optional source filter (e.g. 'human', 'talib', 'model').
When None, includes all sources.
Returns:
Labeled DataFrame ready for training