{"id":13709776,"url":"https://github.com/ContinualAI/avalanche","last_synced_at":"2025-05-06T18:32:56.275Z","repository":{"id":37550358,"uuid":"245145949","full_name":"ContinualAI/avalanche","owner":"ContinualAI","description":"Avalanche: an End-to-End Library for Continual Learning based on PyTorch.","archived":false,"fork":false,"pushed_at":"2025-03-11T16:17:01.000Z","size":16227,"stargazers_count":1880,"open_issues_count":116,"forks_count":306,"subscribers_count":30,"default_branch":"master","last_synced_at":"2025-04-25T17:55:27.584Z","etag":null,"topics":["benchmarks","continual-learning","continualai","deep-learning","evaluation","framework","library","lifelong-learning","metrics","pytorch","strategies","training"],"latest_commit_sha":null,"homepage":"http://avalanche.continualai.org","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ContinualAI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"custom":["https://www.continualai.org/supporters"]}},"created_at":"2020-03-05T11:32:13.000Z","updated_at":"2025-04-24T14:28:13.000Z","dependencies_parsed_at":"2023-09-27T07:40:42.192Z","dependency_job_id":"f9ef2acd-3aca-47b8-ac60-4c225381651d","html_url":"https://github.com/ContinualAI/avalanche","commit_stats":{"total_commits":2797,"total_committers":86,"mean_commits":32.52325581395349,"dds":0.8541294243832678,"last_synced_commit":"699b0a2126c254c8c18a6774c920e0296e95ecac"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ContinualAI%2Favalanche","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ContinualAI%2Favalanche/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ContinualAI%2Favalanche/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ContinualAI%2Favalanche/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ContinualAI","download_url":"https://codeload.github.com/ContinualAI/avalanche/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252744736,"owners_count":21797676,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmarks","continual-learning","continualai","deep-learning","evaluation","framework","library","lifelong-learning","metrics","pytorch","strategies","training"],"created_at":"2024-08-02T23:00:45.913Z","updated_at":"2025-05-06T18:32:54.336Z","avatar_url":"https://github.com/ContinualAI.png","language":"Python","readme":"\u003cdiv align=\"center\"\u003e\n    \n# Avalanche: an End-to-End Library for Continual Learning\n**[Avalanche Website](https://avalanche.continualai.org)** | **[Getting Started](https://avalanche.continualai.org/getting-started)** | **[Examples](https://avalanche.continualai.org/examples)** | **[Tutorial](https://avalanche.continualai.org/from-zero-to-hero-tutorial)** | **[API Doc](https://avalanche-api.continualai.org)** | **[Paper](https://arxiv.org/abs/2104.00405)** | **[Twitter](https://twitter.com/AvalancheLib)**\n\n[![unit test](https://github.com/ContinualAI/avalanche/actions/workflows/unit-test.yml/badge.svg)](https://github.com/ContinualAI/avalanche/actions/workflows/unit-test.yml)\n[![syntax checking](https://github.com/ContinualAI/avalanche/actions/workflows/syntax.yml/badge.svg)](https://github.com/ContinualAI/avalanche/actions/workflows/syntax.yml)\n[![docstring coverage](https://github.com/ContinualAI/avalanche-report/blob/main/badge/interrogate-badge.svg)](https://github.com/ContinualAI/avalanche-report/blob/main/docstring_coverage/documentation-coverage.txt)\n[![Coverage Status](https://coveralls.io/repos/github/ContinualAI/avalanche/badge.svg)](https://coveralls.io/github/ContinualAI/avalanche)\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://www.dropbox.com/s/90thp7at72sh9tj/avalanche_logo_with_clai.png?raw=1\"/\u003e\n\u003c/p\u003e\n\n\n**Avalanche** is an *end-to-end Continual Learning library* based on **Pytorch**, born within [ContinualAI](https://www.continualai.org/) with the unique goal of providing a shared and collaborative \nopen-source (MIT licensed) codebase for fast prototyping, training and reproducible evaluation of continual learning algorithms.\n\n\u003e :warning: Looking for **continual learning baselines**? In the [CL-Baseline](https://github.com/ContinualAI/continual-learning-baselines) sibling project based on Avalanche we reproduce seminal papers results you can directly use in **your experiments**!\n\nAvalanche can help Continual Learning researchers in several ways:\n\n- *Write less code, prototype faster \u0026 reduce errors*\n- *Improve reproducibility, modularity and reusability*\n- *Increase code efficiency, scalability \u0026 portability*\n- *Augment impact and usability of your research products*\n\nThe library is organized into four main modules:\n\n- [Benchmarks](avalanche/benchmarks): This module maintains a uniform API for data handling: mostly generating a stream of data from one or more datasets. It contains all the major CL benchmarks (similar to what has been done for torchvision).\n- [Training](avalanche/training): This module provides all the necessary utilities concerning model training. This includes simple and efficient ways of implement new continual learning strategies as well as a set of pre-implemented CL baselines and state-of-the-art algorithms you will be able to use for comparison!\n- [Evaluation](avalanche/evaluation): This module provides all the utilities and metrics that can help evaluate a CL algorithm with respect to all the factors we believe to be important for a continually learning system. It also includes advanced logging and plotting features, including native Tensorboard support.\n- [Models](avalanche/models): This module provides utilities to implement model expansion and task-aware models, along with a set of pre-trained models and popular architectures that can be used for your continual learning experiment (similar to what has been done in torchvision.models).\n- [Logging](avalanche/logging): It includes advanced logging and plotting features, including native stdout, file and TensorBoard support (How cool it is to have a complete, interactive dashboard, tracking your experiment metrics in real-time with a single line of code?)\n\n_Avalanche_ the first experiment of an **End-to-end Library** for reproducible continual learning research \u0026 development where you can find benchmarks, algorithms, evaluation metrics and much more, in the same place.\n\nLet's make it together :people_holding_hands: a wonderful ride! :balloon:\n\nCheck out below how you can start using Avalanche! :point_down:\n\nQuick Example\n----------------\n\n```python\nimport torch\nfrom torch.nn import CrossEntropyLoss\nfrom torch.optim import SGD\n\nfrom avalanche.benchmarks.classic import PermutedMNIST\nfrom avalanche.models import SimpleMLP\nfrom avalanche.training import Naive\n\n\n# Config\ndevice = torch.device(\"cuda:0\" if torch.cuda.is_available() else \"cpu\")\n# model\nmodel = SimpleMLP(num_classes=10)\n\n# CL Benchmark Creation\nperm_mnist = PermutedMNIST(n_experiences=3)\ntrain_stream = perm_mnist.train_stream\ntest_stream = perm_mnist.test_stream\n\n# Prepare for training \u0026 testing\noptimizer = SGD(model.parameters(), lr=0.001, momentum=0.9)\ncriterion = CrossEntropyLoss()\n\n# Continual learning strategy\ncl_strategy = Naive(\n    model, optimizer, criterion, train_mb_size=32, train_epochs=2,\n    eval_mb_size=32, device=device)\n\n# train and test loop over the stream of experiences\nresults = []\nfor train_exp in train_stream:\n    cl_strategy.train(train_exp)\n    results.append(cl_strategy.eval(test_stream))\n```\n\nCurrent Release\n----------------\n\nAvalanche is a framework in constant development. Thanks to the support of the [ContinualAI](https://www.continualai.org/) community and its active members we are quickly extending its features and improve its usability based on the demands of our research community!\n\nA the moment, Avalanche is in **Beta**. We support [several *Benchmarks*, *Strategies* and *Metrics*](https://avalanche.continualai.org/getting-started/alpha-version), that make it, we believe, the best tool out there for your continual learning research! 💪\n\n**You can install Avalanche by running `pip install avalanche-lib`.**  \nThis will install the core Avalanche package. You can install Avalanche with extra packages to enable more functionalities.  \nLook [here](https://avalanche.continualai.org/getting-started/how-to-install) for a more complete guide on the different ways available to install Avalanche.\n\nGetting Started\n----------------\n\nWe know that learning a new tool may be tough at first. This is why we made Avalanche as easy as possible to learn with a set of resources that will help you along the way.\nFor example, you may start with our 5-minutes guide that will let you acquire the basics about Avalanche and how you can use it in your research project:\n\n- [Getting Started Guide](https://avalanche.continualai.org/getting-started)\n\nWe have also prepared for you a large set of examples \u0026 snippets you can plug-in directly into your code and play with:\n\n- [Avalanche Examples](https://avalanche.continualai.org/examples)\n\nHaving completed these two sections, you will already feel with superpowers ⚡, this is why we have also created an in-depth tutorial that will cover all the aspects of Avalanche in \ndetail and make you a true Continual Learner! :woman_student:\n\n- [From Zero to Hero Tutorial](https://avalanche.continualai.org/from-zero-to-hero-tutorial)\n\nCite Avalanche\n----------------\n\nIf you use Avalanche in your research project, please remember to cite our JMLR-MLOSS paper [https://jmlr.org/papers/v24/23-0130.html](https://jmlr.org/papers/v24/23-0130.html). This will help us make Avalanche better known in the machine learning community, ultimately making a better tool for everyone:\n\n```\n@article{JMLR:v24:23-0130,\n  author  = {Antonio Carta and Lorenzo Pellegrini and Andrea Cossu and Hamed Hemati and Vincenzo Lomonaco},\n  title   = {Avalanche: A PyTorch Library for Deep Continual Learning},\n  journal = {Journal of Machine Learning Research},\n  year    = {2023},\n  volume  = {24},\n  number  = {363},\n  pages   = {1--6},\n  url     = {http://jmlr.org/papers/v24/23-0130.html}\n}\n```\n\nyou can also cite the previous [CLVision @ CVPR2021](https://sites.google.com/view/clvision2021/overview?authuser=0) workshop paper: [\"Avalanche: an End-to-End Library for Continual Learning\"](https://arxiv.org/abs/2104.00405).\n\n```\n@InProceedings{lomonaco2021avalanche,\n    title={Avalanche: an End-to-End Library for Continual Learning},\n    author={Vincenzo Lomonaco and Lorenzo Pellegrini and Andrea Cossu and Antonio Carta and Gabriele Graffieti and Tyler L. Hayes and Matthias De Lange and Marc Masana and Jary Pomponi and Gido van de Ven and Martin Mundt and Qi She and Keiland Cooper and Jeremy Forest and Eden Belouadah and Simone Calderara and German I. Parisi and Fabio Cuzzolin and Andreas Tolias and Simone Scardapane and Luca Antiga and Subutai Amhad and Adrian Popescu and Christopher Kanan and Joost van de Weijer and Tinne Tuytelaars and Davide Bacciu and Davide Maltoni},\n    booktitle={Proceedings of IEEE Conference on Computer Vision and Pattern Recognition},\n    series={2nd Continual Learning in Computer Vision Workshop},\n    year={2021}\n}\n```\n\nMaintained by ContinualAI Lab\n----------------\n\n*Avalanche* is the flagship open-source collaborative project of [ContinualAI](https://www.continualai.org/): a non-profit research organization and the largest open community on Continual Learning for AI.\n\nDo you have a question, do you want to report an issue or simply ask for a new feature? Check out the [Questions \u0026 Issues](https://avalanche.continualai.org/questions-and-issues/ask-your-question) center. Do you want to improve Avalanche yourself? Follow these simple rules on [How to Contribute](https://avalanche.continualai.org/from-zero-to-hero-tutorial/09_contribute-to-avalanche).\n\nThe Avalanche project is maintained by the collaborative research team [ContinualAI Lab](https://www.continualai.org/lab/) and used extensively by the Units of the [ContinualAI Research (CLAIR)](https://www.continualai.org/research/) consortium, a research network of the major continual learning stakeholders around the world.\n\nWe are always looking for new awesome members willing to join the ContinualAI Lab, so check out our [official website](https://www.continualai.org/lab/) if you want to learn more about us and our activities, or [contact us](https://avalanche.continualai.org/contacts-and-links/the-team#contacts).\n\nLearn more about the [Avalanche team and all the people who made it great](https://avalanche.continualai.org/contacts-and-links/the-team)!\n\n\u003cbr\u003e\n\u003cp align=\"left\"\u003e\n\u003ca href=\"https://github.com/ContinualAI/avalanche/graphs/contributors\"\u003e\n \u003cimg width=\"700\" src=\"https://contrib.rocks/image?repo=ContinualAI/avalanche\" /\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n","funding_links":["https://www.continualai.org/supporters"],"categories":["其他_机器学习与深度学习","Deep Learning Framework","Python","Model Training and Orchestration","💻 Resources","Key Implementation Libraries"],"sub_categories":["High-Level DL APIs","Tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FContinualAI%2Favalanche","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FContinualAI%2Favalanche","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FContinualAI%2Favalanche/lists"}