#!/usr/bin/env python3
"""
Automated bulk training - feeds all batches through MCP fastfood.
Run this to complete the 4500-step training run.
"""

import sys
sys.path.insert(0, 'C:\\MONIKA')

from pathlib import Path
from salience_os_seed.runtime.mcp_server import MCPServer
import time

# Get all batch files
batch_dir = Path("C:\\MONIKA\\training_batches")
batch_files = sorted(batch_dir.glob("batch_*.txt"))

print(f"=== Automated Training Started ===")
print(f"Found {len(batch_files)} batch files")
print(f"Starting from current model state...")
print()

# Import MCP tools - assuming server is running
# Note: This needs to be run through the MCP server context
print("ERROR: This script needs to be run through MCP server context")
print("Use the following manual approach instead:")
print()
print("For each batch file (batch_001.txt through batch_090.txt):")
print("1. Read the batch file")
print("2. Pass sentences to mcp3_fastfood tool")
print("3. Every 10 batches (~500 steps):")
print("   - Call mcp3_get_training_metrics")
print("   - Call mcp3_generate_response to test")
print("   - Call mcp3_create_checkpoint to save progress")
print()
print("Estimated: ~4-6 hours for full run")
print("Current: step 439, need ~4000 more steps")
