Skip to content

Fix bare except: use except Exception in background logging loop#11239

Open
koteshyelamati wants to merge 1 commit into
PaddlePaddle:developfrom
koteshyelamati:develop
Open

Fix bare except: use except Exception in background logging loop#11239
koteshyelamati wants to merge 1 commit into
PaddlePaddle:developfrom
koteshyelamati:develop

Conversation

@koteshyelamati

Copy link
Copy Markdown

Replace bare except: with except Exception: in paddlenlp/utils/log.py.

In the background metrics logging thread loop, the bare except: catches BaseException (including SystemExit and KeyboardInterrupt), which can interfere with graceful shutdown. except Exception: catches all real errors while allowing process signals to propagate correctly.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@paddle-bot

paddle-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

Thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants