41 lines
949 B
Python
41 lines
949 B
Python
"""
|
|
Launch training with optimized short-term models only
|
|
"""
|
|
|
|
import os
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
# Add project root to path
|
|
project_root = Path(__file__).parent
|
|
sys.path.insert(0, str(project_root))
|
|
|
|
from core.config import load_config
|
|
from core.training import TrainingManager
|
|
from core.models import OptimizedShortTermModel
|
|
|
|
def main():
|
|
"""Main training function using only optimized models"""
|
|
config = load_config()
|
|
|
|
# Initialize model
|
|
model = OptimizedShortTermModel()
|
|
|
|
# Load best model if exists
|
|
best_model_path = config.model_paths.get('ticks_model')
|
|
if os.path.exists(best_model_path):
|
|
model.load_state_dict(torch.load(best_model_path))
|
|
|
|
# Initialize training
|
|
trainer = TrainingManager(
|
|
model=model,
|
|
config=config,
|
|
use_ticks=True,
|
|
use_realtime=True
|
|
)
|
|
|
|
# Start training
|
|
trainer.train()
|
|
|
|
if __name__ == "__main__":
|
|
main() |