[PR #6646] [MERGED] fix(ml): error logging #11272

Closed
opened 2026-02-05 14:36:31 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/6646
Author: @mertalev
Created: 1/26/2024
Status: Merged
Merged: 1/26/2024
Merged by: @jrasm91

Base: mainHead: fix/ml-error-logging


📝 Commits (3)

📊 Changes

2 files changed (+28 additions, -11 deletions)

View changed files

📝 machine-learning/app/config.py (+23 -5)
📝 machine-learning/log_conf.json (+5 -6)

📄 Description

Description

The ML service's logging configuration is buggy. It only logs log.error calls, not actual exceptions. This led to misleading logs that suggested that it e.g. loads models several times, when in fact it has just been failing to load them and didn't print the exception.

I also tweaked the traceback output to suppress frames from FastAPI etc. The traceback ends up being very long and noisy with irrelevant frames. It still shows the path and line for those, but doesn't show the code.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/immich-app/immich/pull/6646 **Author:** [@mertalev](https://github.com/mertalev) **Created:** 1/26/2024 **Status:** ✅ Merged **Merged:** 1/26/2024 **Merged by:** [@jrasm91](https://github.com/jrasm91) **Base:** `main` ← **Head:** `fix/ml-error-logging` --- ### 📝 Commits (3) - [`f6fe6bc`](https://github.com/immich-app/immich/commit/f6fe6bc71e2637672fb61eadad9867a66c4bf3e5) fix ml error logging - [`c83372c`](https://github.com/immich-app/immich/commit/c83372c6210fe6b95537d8cfc20dd7e519ea9999) exclude certain libraries from traceback - [`a768036`](https://github.com/immich-app/immich/commit/a768036fe6d3f6dc54242181936dda89b9e55c54) formatting ### 📊 Changes **2 files changed** (+28 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `machine-learning/app/config.py` (+23 -5) 📝 `machine-learning/log_conf.json` (+5 -6) </details> ### 📄 Description ## Description The ML service's logging configuration is buggy. It only logs `log.error` calls, not actual exceptions. This led to misleading logs that suggested that it e.g. loads models several times, when in fact it has just been failing to load them and didn't print the exception. I also tweaked the traceback output to suppress frames from FastAPI etc. The traceback ends up being very long and noisy with irrelevant frames. It still shows the path and line for those, but doesn't show the code. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 14:36:31 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#11272