diff --git a/agent/display.py b/agent/display.py index 17595ce27..f926d8c0c 100644 --- a/agent/display.py +++ b/agent/display.py @@ -6,7 +6,6 @@ Used by AIAgent._execute_tool_calls for CLI feedback. import json import os -import random import sys import threading import time diff --git a/agent/redact.py b/agent/redact.py index 22f1a547f..3af458e99 100644 --- a/agent/redact.py +++ b/agent/redact.py @@ -9,7 +9,6 @@ the first 6 and last 4 characters for debuggability. import logging import re -from typing import Optional logger = logging.getLogger(__name__) diff --git a/batch_runner.py b/batch_runner.py index 23eeec48e..07db50dbf 100644 --- a/batch_runner.py +++ b/batch_runner.py @@ -606,7 +606,7 @@ class BatchRunner: # Create batches self.batches = self._create_batches() - print(f"šŸ“Š Batch Runner Initialized") + print("šŸ“Š Batch Runner Initialized") print(f" Dataset: {self.dataset_file} ({len(self.dataset)} prompts)") print(f" Batch size: {self.batch_size}") print(f" Total batches: {len(self.batches)}") @@ -827,7 +827,7 @@ class BatchRunner: print("=" * 70) print(f" Original dataset size: {len(self.dataset):,} prompts") print(f" Already completed: {len(skipped_indices):,} prompts") - print(f" ─────────────────────────────────────────") + print(" ─────────────────────────────────────────") print(f" šŸŽÆ RESUMING WITH: {len(filtered_entries):,} prompts") print(f" New batches created: {len(batches_to_process)}") print("=" * 70 + "\n") @@ -884,7 +884,7 @@ class BatchRunner: ] print(f"āœ… Created {len(tasks)} batch tasks") - print(f"šŸš€ Starting parallel batch processing...\n") + print("šŸš€ Starting parallel batch processing...\n") # Use rich Progress for better visual tracking with persistent bottom bar # redirect_stdout/stderr lets rich manage all output so progress bar stays clean @@ -1031,7 +1031,7 @@ class BatchRunner: print(f"āœ… Total trajectories in merged file: {total_entries - filtered_entries}") print(f"āœ… Total batch files merged: {batch_files_found}") print(f"ā±ļø Total duration: {round(time.time() - start_time, 2)}s") - print(f"\nšŸ“ˆ Tool Usage Statistics:") + print("\nšŸ“ˆ Tool Usage Statistics:") print("-" * 70) if total_tool_stats: @@ -1058,7 +1058,7 @@ class BatchRunner: # Print reasoning coverage stats total_discarded = sum(r.get("discarded_no_reasoning", 0) for r in results) - print(f"\n🧠 Reasoning Coverage:") + print("\n🧠 Reasoning Coverage:") print("-" * 70) total_turns = total_reasoning_stats["total_assistant_turns"] with_reasoning = total_reasoning_stats["turns_with_reasoning"] @@ -1075,8 +1075,8 @@ class BatchRunner: print(f" 🚫 Samples discarded (zero reasoning): {total_discarded:,}") print(f"\nšŸ’¾ Results saved to: {self.output_dir}") - print(f" - Trajectories: trajectories.jsonl (combined)") - print(f" - Individual batches: batch_*.jsonl (for debugging)") + print(" - Trajectories: trajectories.jsonl (combined)") + print(" - Individual batches: batch_*.jsonl (for debugging)") print(f" - Statistics: {self.stats_file.name}") print(f" - Checkpoint: {self.checkpoint_file.name}") @@ -1212,7 +1212,7 @@ def main( with open(prefill_messages_file, 'r', encoding='utf-8') as f: prefill_messages = json.load(f) if not isinstance(prefill_messages, list): - print(f"āŒ Error: prefill_messages_file must contain a JSON array of messages") + print("āŒ Error: prefill_messages_file must contain a JSON array of messages") return print(f"šŸ’¬ Loaded {len(prefill_messages)} prefill messages from {prefill_messages_file}") except Exception as e: