Fix Python 3.12 compatibility across all model table_generators#10
Open
pig8pig wants to merge 2 commits into
Open
Fix Python 3.12 compatibility across all model table_generators#10pig8pig wants to merge 2 commits into
pig8pig wants to merge 2 commits into
Conversation
added 2 commits
March 29, 2026 15:21
- Replace deprecated plt.style.use('seaborn') with 'seaborn-v0_8'
(matplotlib 3.6+ breaking change)
- Replace .max()[0] with .max().iloc[0] for pandas 2.0+ compatibility
- Replace plt.style.use('seaborn') with 'seaborn-v0_8' in all models
(matplotlib 3.6+ removed the seaborn style alias)
- Replace .max()[0] with .max().iloc[0] in all models
(pandas 2.0+ no longer supports integer indexing on named Series)
Fixes affect 15+ model types including DT, RF, XGB, SVM, Bayes,
KM, KNN, NN, IF, PCA, Autoencoder across all type variations.
Tested on: Python 3.12.3, matplotlib 3.x, pandas 2.4.3, Ubuntu 24.04
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.
Combines and extends #7 and #9 into a single comprehensive fix.
Fixes two Python 3.12 breaking changes across ALL 235 model files:
Covers all ML modules: DT, RF, XGB, SVM, KNN, KM, NN, Bayes, IF, PCA, Autoencoder
Tested: Full end-to-end BMv2 deployment on Iris dataset
Matrix 1 (sklearn): 95.56% ✓
Matrix 2 (simulated): 95.56% ✓
Matrix 3 (BMv2 switch): 95.56% ✓
Python 3.12.3, pandas 2.4.3, matplotlib 3.x, Ubuntu 24.04 WSL2