siliconflow / onediff

OneDiff: An out-of-the-box acceleration library for diffusion models.
https://github.com/siliconflow/onediff/wiki
Apache License 2.0
1.7k stars 104 forks source link

Don't suppress OneDiff logging if client code has already defined handlers in parent logger #888

Closed rewbs closed 4 months ago

rewbs commented 6 months ago

With the current code, ConfigurableLogger.configure_logging() returns too soon if logging handlers are already defined in the parent logger.

If handlers are already defined, ConfigurableLogger should still set the OneDiff logging level and assign self.logger. The only step that should be skipped is setting up handlers (because the client code has already defined where logs should be sent).

ccssu commented 5 months ago

git pull git@github.com:rewbs/onediff.git rewbs/upstream-log-fix

👋 Hello @rewbs , thank you for your pr in OneDiff , PR is not a problem, please format it pip install -U black==19.10b0 click==8.0.0 && python -m black src/onediff/infer_compiler/utils/log_utils.py

strint commented 4 months ago

@rewbs Very happy to get your PR. Please help to fix the conflict and I will merge it.