A package I developed for my daily work.
Project description
wppkg is a package I developed for my daily work.
Installation
Environment Setup
Step 1: Set up a Python environment
We recommend creating a virtual Python environment with Anaconda:
conda create -n wppkg python=3.10
conda activate wppkg
Step 2: Install Pytorch
Install 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.
# 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/cu129
Step 3: Install DeepSpeed (Optional)
Install DeepSpeed based on your system configuration. Refer to DeepSpeed installation instructions for the exact command. For example:
pip install deepspeed
Step 4: Install wppkg and dependencies
To install wppkg, run:
pip install wppkg
Or install from github:
git clone https://github.com/Peg-Wu/wppkg
cd wppkg
pip install -e .
# w/o dependencies
pip install -e . --no-deps
Update wppkg
If 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$')
Trainer Tips
- 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wppkg-0.1.2.tar.gz.
File metadata
- Download URL: wppkg-0.1.2.tar.gz
- Upload date:
- Size: 4.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e18a1465a5bdf4a59cbe9120ca99000163b1b5a837b5719a3d2b98dd5f6df995
|
|
| MD5 |
00eb412338c941815099db550fff96de
|
|
| BLAKE2b-256 |
968f5b5864147945f6238fff1e231f7d569949d54a26984c97015aed6a28712b
|
File details
Details for the file wppkg-0.1.2-py3-none-any.whl.
File metadata
- Download URL: wppkg-0.1.2-py3-none-any.whl
- Upload date:
- Size: 23.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
759b7aba1500fe3b27ef0ffd177f174157ff78ebf791fb4ef78df514091816e5
|
|
| MD5 |
3add439aacef8a8f9dc609ba0fa35fc9
|
|
| BLAKE2b-256 |
8b5f3e2c27b8dbda5135b3b510c4971560c318856d9723b00d904682df5143a5
|