wppkg is a package I developed for my daily work.
🔥About Me
We recommend creating a virtual Python environment with Anaconda:
- Required version:
python >= 3.10
conda create -n wppkg python=3.10
conda activate wppkgInstall PyTorch based on your system configuration. Refer to PyTorch installation instructions
For the exact command, for example:
- You may choose any version to install, but make sure the PyTorch version is not too old.
- We recommend
torch ≥ 2.6.
# Installation Example: torch v2.8.0
# CUDA 12.6
pip install torch==2.8.0 torchvision==0.23.0 torchaudio==2.8.0 --index-url https://download.pytorch.org/whl/cu126
# CUDA 12.8
pip install torch==2.8.0 torchvision==0.23.0 torchaudio==2.8.0 --index-url https://download.pytorch.org/whl/cu128
# CUDA 12.9
pip install torch==2.8.0 torchvision==0.23.0 torchaudio==2.8.0 --index-url https://download.pytorch.org/whl/cu129Install DeepSpeed based on your system configuration. Refer to DeepSpeed installation instructions
For the exact command, for example:
pip install deepspeedTo install wppkg, run:
pip install wppkgOr install from github:
git clone https://github.com/Peg-Wu/wppkg
cd wppkg
pip install [-e] .
# w/o dependencies
pip install [-e] . --no-depsIf you want to update all dependencies of wppkg except torch, you can run the following command:
pip install -U $(pip show wppkg | sed -n 's/^Requires: //p' | tr ',' ' ' | xargs -n1 | grep -vi '^torch$')- Early stopping does not currently support resuming training. If training is forcibly resumed, the early stopping callback will be reinitialized.
- If you enable early stopping, ensure that
eval_every_n_epochsandcheckpointing_stepsare aligned, as the Trainer does not automatically save the best model. - The final model is always saved at the end of training, even if early stopping is triggered.
