diff --git a/batch_runner.py b/batch_runner.py index 347883a14d..53caf4a1c6 100644 --- a/batch_runner.py +++ b/batch_runner.py @@ -298,10 +298,7 @@ def _process_batch_worker(args: Tuple) -> Dict[str, Any]: output_dir = Path(output_dir) print(f"\nšŸ”„ Batch {batch_num}: Starting ({len(batch_data)} prompts)") batch_output_file = output_dir / f"batch_{batch_num}.jsonl" - prompts_to_process = [ - (idx, data) for idx, data in batch_data - if idx not in completed_prompts_set - ] + prompts_to_process = [(idx, data) for idx, data in batch_data if idx not in completed_prompts_set] if not prompts_to_process: print(f"āœ… Batch {batch_num}: Already completed (skipping)") @@ -497,12 +494,7 @@ class BatchRunner: return _chunk(list(enumerate(self.dataset)), self.batch_size) def _empty_checkpoint(self) -> Dict[str, Any]: - return { - "run_name": self.run_name, - "completed_prompts": [], - "batch_stats": {}, - "last_updated": None - } + return {"run_name": self.run_name, "completed_prompts": [], "batch_stats": {}, "last_updated": None} def _load_checkpoint(self) -> Dict[str, Any]: """Checkpoint data (completed prompt indices), or an empty one if missing/unreadable.""" diff --git a/hermes_constants.py b/hermes_constants.py index d8eff1a11b..8855141c41 100644 --- a/hermes_constants.py +++ b/hermes_constants.py @@ -1039,9 +1039,7 @@ def resolve_reasoning_config(cfg: dict | None, model: str = "") -> dict | None: result = parse_reasoning_effort(effort) if effort and str(effort).strip() and result is None: import logging - logging.getLogger(__name__).warning( - "Unknown reasoning_effort '%s', using default (medium)", effort - ) + logging.getLogger(__name__).warning("Unknown reasoning_effort '%s', using default (medium)", effort) return result @@ -1178,9 +1176,7 @@ def apply_ipv4_preference(force: bool = False) -> None: def _ipv4_getaddrinfo(host, port, family=0, type=0, proto=0, flags=0): if family == 0: # AF_UNSPEC — caller didn't request a specific family try: - return _original_getaddrinfo( - host, port, socket.AF_INET, type, proto, flags - ) + return _original_getaddrinfo(host, port, socket.AF_INET, type, proto, flags) except socket.gaierror: # no A record — pure-IPv6 host return _original_getaddrinfo(host, port, family, type, proto, flags) return _original_getaddrinfo(host, port, family, type, proto, flags) diff --git a/hermes_startup_watchdog.py b/hermes_startup_watchdog.py index 9985689909..70acc45ce7 100644 --- a/hermes_startup_watchdog.py +++ b/hermes_startup_watchdog.py @@ -434,11 +434,7 @@ class StartupWatchdogHandle: return def _start(self) -> bool: - thread = threading.Thread( - target=self._run, - daemon=True, - name="gateway-startup-watchdog", - ) + thread = threading.Thread(target=self._run, daemon=True, name="gateway-startup-watchdog") try: thread.start() except Exception: