fix+logging: model load logging, CPU fallback, log level audit
Bugs fixed (from high-effort review): - InsightFace CPU fallback now passes providers=['CPUExecutionProvider'] and wraps in _suppress_output() so broken GPU drivers don't cause fallback to try the same broken provider again, and C-extension noise stays suppressed - scheduler.py: BaseException → Exception (KeyboardInterrupt already re-raised; winnow has no sys.exit() calls, so SystemExit would not occur, but Exception is the correct scope) - compose.yml: fix inverted AUTO_MODE comment (docker run -it enables interactive mode via TTY, not non-interactive) Model loading logging (embeddings.py): - InsightFace: disk cache check, "not cached — downloading now (~300 MB)", "loading into memory on GPU/CPU...", "ready on GPU/CPU (Xs)" - SigLIP: same treatment; cache path derived dynamically from model_name via HuggingFace slug convention (models--org--model) so it stays correct if the model variant ever changes Logging level audit (INFO/DEBUG/WARNING/ERROR): - diversity.py: internal algo steps (clustering, medoids, adaptive threshold, auto-stop decision) → DEBUG; final selection summaries stay INFO - immich_api.py: "Fetching assets" and "Retained N assets" → DEBUG (callers already print this to the console via rprint) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -49,7 +49,7 @@ def fetch_all_assets(person: dict) -> list[dict]:
|
||||
url = f"{Config.IMMICH_URL}/api/search/metadata"
|
||||
page_size = 1000
|
||||
|
||||
logger.info(f"Fetching assets for {name}...")
|
||||
logger.debug(f"Fetching assets for {name}...")
|
||||
|
||||
assets = []
|
||||
for page in range(1, MAX_PAGES + 1):
|
||||
@@ -212,6 +212,6 @@ def filter_recent_assets(assets: list[dict], years: int | None = None) -> list[d
|
||||
except ValueError:
|
||||
continue
|
||||
|
||||
logger.info(f"Retained {len(recent)} assets (filtered {skipped} old assets).")
|
||||
logger.debug(f"Retained {len(recent)} assets (filtered {skipped} old assets).")
|
||||
return recent
|
||||
|
||||
|
||||
Reference in New Issue
Block a user