┼╂┼
∩_┃_∩
|ノ ヽ
/ ● ● |
| (_●_) ミ < There is absolutely no warranty. >
彡、 |∪| 、`\
/ __ ヽノ /´> )
(___) / (_/
Copy all the files to your working directory via:
git clone https://github.com/analokmaus/kuma_utils.git
See tutorial notebooks below.
For compatibility, old version of kuma_utils can be found in branch 2019
.
Checkout to the branch via
git checkout 2019
as needed.
- Multi-node DDP
Create a new environment and:
pip install -r reqirements.txt
pip install -q https://github.com/pfnet-research/xfeat/archive/master.zip
pip install category_encoders
For mixed precision training, you must install version >= 1.6.0
.
Follow official instructions.
Follow official instructions.
pip install japanize-matplotlib
┣ visualization
┃ ┣ explore_data - Simple exploratory data analysis.
┃
┣ preprocessing
┃ ┣ xfeat - xfeat modifications.
┃ ┃ ┣ TargetEncoder
┃ ┃ ┣ Pipeline
┃ ┣ DistTransformer - Distribution transformer for numerical features.
┃ ┣ LGBMImputer - Regression imputer for missing values using LightGBM.
┃
┣ training
┃ ┣ Trainer - Amazing wrapper for scikit-learn API models.
┃ ┣ CrossValidator - Amazing cross validation wrapper.
┃ ┣ LGBMLogger - Logger callback for LightGBM/XGBoost/Optuna.
┃ ┣ StratifiedGroupKFold - Stratified group k-fold split.
┃ ┣ optuna - optuna modifications.
┃ ┣ lightgbm - Optune lightgbm integration with modifiable n_trials.
┃
┣ metrics - Universal metrics
┃ ┣ SeAtFixedSp - Sensitivity at fixed specificity.
┃ ┣ RMSE
┃ ┣ AUC
┃ ┣ Accuracy
┃ ┣ QWK
┃
┣ torch
┣ lr_scheduler
┃ ┣ ManualScheduler
┃ ┣ CyclicCosAnnealingLR
┃ ┣ CyclicLinearLR
┃
┣ optimizer
┃ ┣ SAM
┃
┣ modules
┃ ┃ (activation)
┃ ┣ Mish
┃ ┃ (pooling)
┃ ┣ AdaptiveConcatPool2d/3d
┃ ┣ GeM
┃ ┃ (attention)
┃ ┣ CBAM2d
┃ ┃ (normalization)
┃ ┣ GroupNorm1d/2d/3d
┃ ┣ convert_groupnorm - Convert all BatchNorm to GroupNorm.
┃ ┣ etc...
┃
┣ TorchTrainer - PyTorch Wrapper.
┣ EarlyStopping - Early stopping callback for TorchTrainer.
┣ SaveEveryEpoch - Save snapshot at the end of every epoch.
┣ SaveSnapshot - Checkpoint callback.
┣ TorchLogger - Logger
┣ TensorBoardLogger - TensorBoard Logger
┣ SimpleHook - Simple train hook for almost all the tasks (see tutorial).
┣ TemperatureScaler - Probability calibration for pytorch models.
- Exploratory data analysis
- Data preprocessing
- Train and validate scikit-learn API models
- Train CIFAR-10 (TorchTrainer tutorial)
The source code in this repository is released under the MIT license.