fixed model training

This commit is contained in:
Dobromir Popov
2025-11-12 18:11:19 +02:00
parent 7cb4201bc0
commit 8354aec830
6 changed files with 9 additions and 9 deletions

View File

@@ -815,8 +815,8 @@ class RealTrainingAdapter:
continue
if entry_index is None:
logger.warning(f"Could not find entry timestamp in market data")
return negative_samples
logger.debug(f"Could not find entry timestamp in market data - using first candle as entry")
entry_index = 0 # Use first candle if exact match not found
# If exit not found, estimate it
if exit_index is None:
@@ -1958,7 +1958,7 @@ class RealTrainingAdapter:
'training_id': session.training_id
},
file_path=checkpoint_path,
performance_score=float(avg_accuracy), # Use accuracy as score
file_size_mb=os.path.getsize(checkpoint_path) / (1024 * 1024) if os.path.exists(checkpoint_path) else 0.0,
is_active=True
)

View File

@@ -213,7 +213,7 @@ class AnnotationDashboard:
SELECT checkpoint_id, performance_metrics, timestamp, file_path
FROM checkpoint_metadata
WHERE model_name = ? AND is_active = TRUE
ORDER BY performance_score DESC
ORDER BY timestamp DESC
LIMIT 1
""", (model_name.lower(),))