diff --git a/.gitignore b/.gitignore index 08f6a6435..896545c1c 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ doc_html/* tb_data/ csvlogs/ docs/generated/ +docs/_build/ .fleet pip-wheel-metadata **/.DS_Store diff --git a/README.md b/README.md index a7cc816a2..a7511d4dd 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ Current Release Avalanche 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! -A the moment, Avalanche is in [**Beta (v0.3.1)**](https://github.com/ContinualAI/avalanche/releases/tag/v0.3.1). 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! 💪 +A 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! 💪 **You can install Avalanche by running `pip install avalanche-lib`.** This will install the core Avalanche package. You can install Avalanche with extra packages to enable more functionalities. @@ -128,7 +128,7 @@ Maintained by ContinualAI Lab *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. -Do you have a question, do you want to report an issue or simply ask for a new feature? Check out the [Questions & 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://app.gitbook.com/@continualai/s/avalanche/~/drafts/-MMtZhFEUwjWE4nnEpIX/from-zero-to-hero-tutorial/6.-contribute-to-avalanche). +Do you have a question, do you want to report an issue or simply ask for a new feature? Check out the [Questions & 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). The 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. diff --git a/avalanche/__init__.py b/avalanche/__init__.py index 5f3f2a0f1..c7861d873 100644 --- a/avalanche/__init__.py +++ b/avalanche/__init__.py @@ -5,7 +5,7 @@ from avalanche import training -__version__ = "0.3.1" +__version__ = "0.4.0" _dataset_add = None diff --git a/avalanche/evaluation/metrics/accuracy.py b/avalanche/evaluation/metrics/accuracy.py index 8cb92a0be..e745bcf36 100644 --- a/avalanche/evaluation/metrics/accuracy.py +++ b/avalanche/evaluation/metrics/accuracy.py @@ -458,4 +458,5 @@ def accuracy_metrics( "StreamAccuracy", "TrainedExperienceAccuracy", "accuracy_metrics", + "AccuracyPerTaskPluginMetric", ] diff --git a/avalanche/evaluation/metrics/mean_scores.py b/avalanche/evaluation/metrics/mean_scores.py index b82484eb4..bfc956913 100644 --- a/avalanche/evaluation/metrics/mean_scores.py +++ b/avalanche/evaluation/metrics/mean_scores.py @@ -308,4 +308,5 @@ def mean_scores_metrics( "MeanScoresEvalPluginMetric", "MeanScores", "MeanNewOldScores", + "PerClassMeanScores", ] diff --git a/avalanche/training/supervised/lamaml.py b/avalanche/training/supervised/lamaml.py index 7df37787c..81a9866cd 100644 --- a/avalanche/training/supervised/lamaml.py +++ b/avalanche/training/supervised/lamaml.py @@ -1,6 +1,7 @@ from typing import Callable, Sequence, Optional, Union import torch +import warnings import torch.nn as nn import torch.nn.functional as F from torch.nn import Module, CrossEntropyLoss @@ -10,7 +11,7 @@ try: import higher except ImportError: - raise ModuleNotFoundError( + warnings.warn( "higher not found, if you want to use " "MAML please install avalanche with " "the extra dependencies: " diff --git a/avalanche/training/supervised/lamaml_v2.py b/avalanche/training/supervised/lamaml_v2.py index 948c87ca4..9301a14c5 100644 --- a/avalanche/training/supervised/lamaml_v2.py +++ b/avalanche/training/supervised/lamaml_v2.py @@ -1,9 +1,10 @@ from typing import Callable, List, Sequence, Optional, Union from packaging.version import parse +import warnings import torch if parse(torch.__version__) < parse("2.0.0"): - raise RuntimeError(f"LaMAML requires torch >= 2.0.0.") + warnings.warn(f"LaMAML requires torch >= 2.0.0.") import torch import torch.nn as nn diff --git a/docs/conf.py b/docs/conf.py index c251ed44e..79000fe8d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -348,6 +348,72 @@ "OpenLORISDataset", "VAEMLPEncoder", "LvisDataset", + "SupervisedDetectionDataset", + "GenericDetectionExperience", + "SupervisedStrategyProtocol", + "ClassBalancedBufferWithLogits", + "SequenceCLStream", + "LVISImgTargets", + "CLStreamWrapper", + "BiasLayer", + "DetectionCLScenario", + "GeneratorMemo", + "LossPerTaskPluginMetric", + "MultiDatasetDataLoader", + "AbstractClassTimelineExperience", + "DefaultTransformGroups", + "BroadcastSeedContext", + "LazyIndices", + "SupervisedProblem", + "DatasetStream", + "MetaUpdate", + "OnlineClassificationExperience", + "FactoryBasedStream", + "DetectionDataset", + "ExpertAutoencoder", + "ExpertModel", + "NIStream", + "SGDUpdate", + "ClassificationScenario", + "TransformGroups", + "EmptyTransformGroups", + "BatchObservation", + "SCRModel", + "MERBuffer", + "BasicBlock", + "SequenceStreamWrapper", + "SizedCLStream", + "DetectionExperience", + "SupervisedClassificationDataset", + "DatasetExperience", + "SizedCLStreamWrapper", + "Prompt", + "ResNet", + "SliceSequence", + "DetectionStream", + "ExperienceWrapper", + "ClassesTimelineCLScenario", + "DetectionScenario", + "AETraining", + "BaseStrategyProtocol", + "MappedUnpickler", + "FlatData", + "ParamData", + "MultiDatasetSampler", + "DatasetScenario", + "NCStream", + "GenericClassificationExperience", + "MultiParamCompose", + "LazyRange", + "SGDStrategyProtocol", + "SupervisedMetaLearningTemplate", + "RollingSeedContext", + "TaskLabels", + "SupervisedMetaLearningPlugin", + "TupleTransform", + "MetaLearningStrategyProtocol", + "MultiParamTransformCallable", + "TqdmUpTo", ] undocumented_classes_to_ignore = set(undocumented_classes_to_ignore) diff --git a/docs/evaluation.rst b/docs/evaluation.rst index 9fc627a40..b3d0ae732 100644 --- a/docs/evaluation.rst +++ b/docs/evaluation.rst @@ -91,6 +91,10 @@ Experience Metrics ExperienceTopkAccuracy WeightCheckpoint ImagesSamplePlugin + CumulativeAccuracyPluginMetric + CumulativeForgettingPluginMetric + AccuracyPerTaskPluginMetric + AccuracyMatrixPluginMetric Epoch Metrics ^^^^^^^^^^^^^^^^^^^^ @@ -184,8 +188,8 @@ Standalone Metrics Sum TopkAccuracy TrainedExperienceTopkAccuracy - - + CumulativeAccuracy + PerClassMeanScores evaluation.metrics.detection ---------------------------------------- diff --git a/docs/models.rst b/docs/models.rst index 90111a98d..0b2ab30eb 100644 --- a/docs/models.rst +++ b/docs/models.rst @@ -54,6 +54,7 @@ Models LeNet5 SlimResNet18 MTSlimResNet18 + ExpertGate Progressive Neural Networks diff --git a/docs/training.rst b/docs/training.rst index 8f31edfcf..8b734be03 100644 --- a/docs/training.rst +++ b/docs/training.rst @@ -29,7 +29,6 @@ Templates are defined in the `avalanche.training.templates` module. BaseTemplate BaseSGDTemplate SupervisedTemplate - OnlineSupervisedTemplate Plugins ABCs @@ -77,10 +76,18 @@ Ready-to-use continual learning strategies. CoPE LFL GenerativeReplay - LaMAML MAS BiC MIR + MER + ER_ACE + LearningToPrompt + SCR + FromScratchTraining + ExpertGateStrategy + DER + supervised.lamaml.LaMAML + supervised.lamaml_v2.LaMAML Replay Buffers and Selection Strategies ---------------------------------------- @@ -123,6 +130,8 @@ Loss Functions ICaRLLossPlugin RegularizationMethod LearningWithoutForgetting + ACECriterion + SCRLoss Training Plugins @@ -160,6 +169,7 @@ Strategy implemented as plugins in `avalanche.training.plugins`. CWRStarPlugin EWCPlugin GDumbPlugin + RWalkPlugin GEMPlugin GSS_greedyPlugin LFLPlugin @@ -172,7 +182,8 @@ Strategy implemented as plugins in `avalanche.training.plugins`. GenerativeReplayPlugin BiCPlugin MIRPlugin - + RARPlugin + FromScratchTrainingPlugin Utilities ----------------------------------------