gmumcl
A small, generic continual-learning framework for PyTorch: five incremental scenarios, a plugin API with task-lifecycle hooks, an accuracy-matrix trainer, and reference implementations of the standard CL baselines.
Install
activationscope builds a C++ extension with -std=c++17, so install torch 2.8
first (newer torch headers require C++20), then build it against that torch:
pip install "torch==2.8.*" --index-url https://download.pytorch.org/whl/cpu # or /cu128
pip install setuptools wheel ninja numpy
pip install activationscope --no-build-isolation
pip install gmumcl # or: pip install "gmumcl[datasets]"
From source: git clone https://github.com/gmum/gmumcl && cd gmumcl && pip install -e ".[test]".
Full notes (why the pin, why --no-build-isolation): docs/usage.md.
Quickstart
python scripts/run.py --config configs/base.yaml -O method.name=ewc -O method.lambda=10
from gmumcl import train
metrics = train.run({
"data": {"name": "toy", "num_classes": 4, "classes_per_task": 2},
"model": {"name": "mlp", "hidden": 16},
"trainer": {"epochs": 1, "lr": 0.01, "device": "cpu"},
"method": {"name": "ewc", "lambda": 1.0},
})
print(metrics["accuracy_matrix"])
Scenarios (data.scenario)
| Key | Tasks | Evaluation |
|---|---|---|
class_incremental |
disjoint class groups | all classes seen so far |
task_incremental |
disjoint class groups | task oracle (logits masked to the task) |
domain_incremental |
all classes, shifted inputs (rotations) | all classes |
instance_incremental |
random partitions of all instances | all classes |
permuted |
all classes, one fixed input permutation per task | all classes |
Dataset names: toy (CPU clusters), mnist, cifar10, cifar100, plus
rotated_mnist (domain-incremental) and permuted_mnist.
Methods (method.name)
| Name | Reference | Source |
|---|---|---|
naive |
— | plain fine-tuning |
l2 |
Hsu et al. 2018 | quadratic anchor |
ewc |
Kirkpatrick et al. 2017 | gmumcl / InTAct-Flex |
ewc_dr |
EWC-DR | scarlet0703/EWC-DR (adcaaeb9) |
online_ewc |
Schwarz et al. 2018 | gmumcl / InTAct-Flex |
si |
Zenke et al. 2017 | gmumcl |
mas |
Aljundi et al. 2018 | gmumcl |
lwf |
Li & Hoiem 2017 | gmumcl / GMvandeVen/continual-learning |
kfac |
Kao et al. 2021 | Xin-Jing/K-FAC (09f4565c) |
ncl |
Kao et al. 2021 | tachukao/ncl (92c2ba5e) |
owm |
Zeng et al. 2019 | GMvandeVen/continual-learning (e6d795aa) |
gpm |
Saha et al. 2021 | sahagobinda/GPM (1a238ec9) |
intact |
Krukowski et al. 2025 | pkrukowski1/InTAct (83b90c55) |
sharpening |
gmumcl | OneAndZero24/local-cl |
dreaming |
gmumcl | OneAndZero24/local-cl (needs model.head_type: rbf) |
Docs
docs/framework.md— plugin lifecycle, trainer, metrics, adding a methoddocs/scenarios.md— the five scenarios and their protocolsdocs/methods.md— formulas, defaults and provenance per methoddocs/usage.md— install, CLI, configs, custom componentsdocs/results.md— reproduced Split-MNIST table (from AdaReg) and deviations
License
MIT (GMUM). See LICENSE.
Metadata
Release files for gmumcl 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gmumcl-1.1.0.tar.gz | 67.2 kB | Without provenance | Details for gmumcl-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gmumcl-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for gmumcl-1.1.0-py3-none-any.whl |
Total release size: 115.5 kB
Release files / gmumcl-1.1.0.tar.gz
| Download URL | gmumcl-1.1.0.tar.gz |
|---|---|
| Size | 67.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6110eff379614ac1b5ebf36d14c15af8fb89a134172235b4e228570cc49f2911
|
|
BLAKE2b-256 checksum How to use checksums |
008596d9197ec04b6363ad55e4fd7f8269a26c3923de8bb0507a7f684b85738e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / gmumcl-1.1.0-py3-none-any.whl
| Download URL | gmumcl-1.1.0-py3-none-any.whl |
|---|---|
| Size | 48.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2b4154e5953343205c475cf0ead9a220e66d8d49bfaa058d4ea5281edfc05699
|
|
BLAKE2b-256 checksum How to use checksums |
875471d84e11d1faa63b67f3e3d4d5dc72f21246bfd435fc1dbdc743507fffe3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for gmumcl 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.