sklego/debug-pipeline-default-log
| Rule | debug-pipeline-default-log |
|---|---|
| Pack | scikit-lego |
| Severity | info |
| Fix | none, edit by hand |
| Library versions | every version |
log_callback="default" logs at level INFO, which Python hides until logging is set up, so the pipeline prints nothing. Call logging.basicConfig(level=logging.INFO) first, or pass a callback that prints.
import logging
logging.basicConfig(level=logging.INFO)pipeline = DebugPipeline(steps, log_callback="default")What the rule reports
Section titled “What the rule reports”The rule reports log_callback="default" on DebugPipeline and make_debug_pipeline in a file
that neither imports logging nor uses pytest's caplog. The default callback logs each step at
level INFO, which Python hides until logging is set up.
How to fix it
Section titled “How to fix it”xpd has no automatic fix, so make the change by hand.
Without the setup, fitting the pipeline printed 0 characters. After
logging.basicConfig(level=logging.INFO) it logged one line for each step, such as
[StandardScaler()] shape=(400, 6) time=0s. Logging may be set up in another module, so the rule
is info.
Message
Section titled “Message”xpd prints this message with the issue. A name that starts with $ stands for code from your file.
log_callback="default" logs at level INFO, which Python hides until logging is set up, so the pipeline printed 0 characters. Call logging.basicConfig(level=logging.INFO) first, or pass a callback that prints.Browse the other rules of the scikit-lego pack.