[object Object]

← back to Exo

Reduce download log spam (#1225)

4ea66d427b67d5a294f81c1bca60638165d351de · 2026-01-20 16:57:05 +0000 · Alex Cheema

## Motivation

When `skip_download=True`, exo was logging a lot of unnecessary messages during periodic download status checks. This resulted in spammy logs that made it hard to see important messages.

## Changes

- Only log "Downloading ... with allow_patterns=..." when actually downloading (not when skip_download is true)
- Changed periodic download progress check logs from INFO to DEBUG level

## Why It Works

The `skip_download=True` parameter is used when checking download status without actually downloading. By guarding the log behind `if not skip_download:`, we avoid logging on every status check. Changing the periodic emitting logs to DEBUG level reduces noise while still keeping them available for debugging.

## Test Plan

### Manual Testing
- Run exo and observe that logs are less spammy during normal operation
- Use -v or -vv flags to see DEBUG logs when needed

### Automated Testing
- Existing tests cover this code path

Files touched

Diff

commit 4ea66d427b67d5a294f81c1bca60638165d351de
Author: Alex Cheema <41707476+AlexCheema@users.noreply.github.com>
Date:   Tue Jan 20 16:57:05 2026 +0000

     Reduce download log spam (#1225)
    
    ## Motivation
    
    When `skip_download=True`, exo was logging a lot of unnecessary messages during periodic download status checks. This resulted in spammy logs that made it hard to see important messages.
    
    ## Changes
    
    - Only log "Downloading ... with allow_patterns=..." when actually downloading (not when skip_download is true)
    - Changed periodic download progress check logs from INFO to DEBUG level
    
    ## Why It Works
    
    The `skip_download=True` parameter is used when checking download status without actually downloading. By guarding the log behind `if not skip_download:`, we avoid logging on every status check. Changing the periodic emitting logs to DEBUG level reduces noise while still keeping them available for debugging.
    
    ## Test Plan
    
    ### Manual Testing
    - Run exo and observe that logs are less spammy during normal operation
    - Use -v or -vv flags to see DEBUG logs when needed
    
    ### Automated Testing
    - Existing tests cover this code path
---
 src/exo/worker/download/download_utils.py | 3 ++-
 src/exo/worker/main.py                    | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/exo/worker/download/download_utils.py b/src/exo/worker/download/download_utils.py
index 0165e59b..c178f597 100644
--- a/src/exo/worker/download/download_utils.py
+++ b/src/exo/worker/download/download_utils.py
@@ -552,7 +552,8 @@ async def download_shard(
     if not allow_patterns:
         allow_patterns = await resolve_allow_patterns(shard)
 
-    logger.info(f"Downloading {shard.model_card.model_id=} with {allow_patterns=}")
+    if not skip_download:
+        logger.info(f"Downloading {shard.model_card.model_id=} with {allow_patterns=}")
 
     all_start_time = time.time()
     # TODO: currently not recursive. Some models might require subdirectories - thus this will need to be changed.
diff --git a/src/exo/worker/main.py b/src/exo/worker/main.py
index 342c1989..7f331a15 100644
--- a/src/exo/worker/main.py
+++ b/src/exo/worker/main.py
@@ -449,7 +449,7 @@ class Worker:
     async def _emit_existing_download_progress(self) -> None:
         try:
             while True:
-                logger.info("Fetching and emitting existing download progress...")
+                logger.debug("Fetching and emitting existing download progress...")
                 async for (
                     _,
                     progress,
@@ -480,7 +480,7 @@ class Worker:
                     await self.event_sender.send(
                         NodeDownloadProgress(download_progress=status)
                     )
-                logger.info("Done emitting existing download progress.")
+                logger.debug("Done emitting existing download progress.")
                 await anyio.sleep(5 * 60)  # 5 minutes
         except Exception as e:
             logger.error(f"Error emitting existing download progress: {e}")

← 8b709e68 Mark slow tests as slow (#1220)  ·  back to Exo  ·  Remove dead local paths code from download_shard (#1227) ea9c6d6b →