Daily Audit 2026-04-25: logging violations, CatBoost optimization bug, global warning suppression, DataFrame fragmentation - #207
Draft
ch55secake with Copilot wants to merge 2 commits into
Draft
Daily Audit 2026-04-25: logging violations, CatBoost optimization bug, global warning suppression, DataFrame fragmentation#207ch55secake with Copilot wants to merge 2 commits into
ch55secake with Copilot wants to merge 2 commits into
Conversation
…bal warning suppression, DataFrame fragmentation Agent-Logs-Url: https://github.com/ch55secake/hyperion/sessions/de5aec33-6ed5-4a1e-8ab1-062876a6139b Co-authored-by: ch55secake <87881861+ch55secake@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Audit Hyperion codebase for bugs and performance
Daily Audit 2026-04-25: logging violations, CatBoost optimization bug, global warning suppression, DataFrame fragmentation
Apr 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Four new issues found during the 2026-04-25 codebase audit — not covered by any existing open issue — across logging, ML correctness, and performance categories.
Changes in this pull request
Logging violations (
base_pipeline.py,stacked_pipeline.py):traceback.print_exc()was called alongsidelogger.error()in exception handlers, violating the no-print()rule. Replaced withlogger.exception()(logs at ERROR level + full traceback). Removed now-unusedimport tracebackin both files.CatBoost optimization silently used LightGBM params (
single_pipeline.py):_optimize_hyperparameters()had anif xgboost / else lightgbmstructure — anymodel_typeother than"xgboost"(including"catboost") ran LightGBM Optuna trials and passed those params to the model. Fixed with explicitif/elif/else; unsupported types now log aWARNINGand fall back to defaults.Global
warnings.filterwarnings('ignore')inmain.py: Separate untracked occurrence of the pattern already captured in Performance: warnings.filterwarnings('ignore') suppresses all warnings globally #103 foroptimizer.py. Removed.DataFrame fragmentation (
feature_engineering.py,base_pipeline.py):add_all_technical_indicators()inserts ~130 columns one-by-one, causing pandasPerformanceWarning: DataFrame is highly fragmentedat lines 282, 289, and 293. Addedself.df = self.df.copy()midway to consolidate blocks before late indicators. Also refactored_add_stock_features()from 6 individual column assignments to a singlepd.concat. Test-suite PerformanceWarnings dropped from 1503 → 29.