Skip to content

Commit

Permalink
Update gitbook documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ContinualAI-bot committed Jan 7, 2022
1 parent 90f03dc commit 6eb8c81
Show file tree
Hide file tree
Showing 6 changed files with 100 additions and 132 deletions.
51 changes: 11 additions & 40 deletions docs/gitbook/from-zero-to-hero-tutorial/01_introduction.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,21 @@
---
description: Understand the Avalanche Structure
description: Understand the Avalanche Package Structure
---

# Introduction

![](../.gitbook/assets/avalanche\_api.png)
Welcome to the "_Introduction_" tutorial of the "_From Zero to Hero_" series. We will start our journey by taking a quick look at the _Avalanche_ main modules to understand its **general architecture**.

Welcome to the "_Introduction_" tutorial of the "_From Zero to Hero_" series. We will start our journey by taking a quick look at _Avalanche_ main modules and its **general architecture**.
As hinted in the getting started introduction _Avalanche_ is organized in **five main modules**:

_Avalanche_ is organized in **five main modules**: Benchmarks, Training, Evaluation, Models, Logging.

#### Benchmarks

This module provides 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](https://pytorch.org/docs/stable/torchvision/index.html)). Its main components are:

* **Benchmarks**: these are complete benchmarks, providing access to train/test streams.
* **Streams**: a sequential list of learning experiences.
* **Experience**: a bunch of data available at a specific point in time.
* **AvalancheDataset**: a dataset that provides support for train/eval transformations, concatenation and subsampling, and other operations needed to manipulate data in continual learning strategies.

#### 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 pre-implemented CL baselines and state-of-the-art algorithms you will be able to use for comparison!

* **BaseStrategy** provides the default training and eval loops.
* **Plugins** extend the basic loops with additional functionality.

#### **`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.

* **EvaluationPlugin**: the plugin that connects metrics and the `BaseStrategy.`
* **MetricPlugins**: plugins that provide a bridge between metrics and the evaluation plugin. They emit `MetricValue`s that will be collected by the `EvaluationPlugin` and serialized by the loggers.
* **Metric**: basic logic to compute a metric. Provides the `update`, `result` and `reset` operations used to compute and retrieve the metric value.

#### Models

In this module you'll find model architectures, pre-trained models, and utilities to implement continual learning models. We provide everything you need to implement architectural strategies, task-aware models, and dynamic model expansion.

#### Logging

Metrics are automatically logger using native _stdout_, _files_ and [Tensorboard](https://www.tensorflow.org/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?)

## File Structure
* **`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](https://pytorch.org/docs/stable/torchvision/index.html)\).
* **`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 pre-implemented CL baselines and state-of-the-art algorithms you will be able to use for comparison!
* **`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](https://www.tensorflow.org/tensorboard) support.
* **`Models`**: In this module you'll find several model architectures and pre-trained models that can be used for your continual learning experiment \(similar to what has been done in [torchvision.models](https://pytorch.org/docs/stable/torchvision/index.html)\). Furthermore, we provide everything you need to implement architectural strategies, task-aware models, and dynamic model expansion.
* **`Logging`**: It includes advanced logging and plotting features, including native _stdout_, _file_ and [Tensorboard](https://www.tensorflow.org/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?\)

{% code title="Avalanche Main Modules and Sub-Modules" %}
```
```text
Avalanche
├── Benchmarks
│ ├── Classic
Expand All @@ -63,6 +33,7 @@ Avalanche
| └── Utils
├── Models
└── Loggers
```
{% endcode %}

Expand All @@ -74,4 +45,4 @@ In the following tutorials we will assume you have already installed _Avalanche

## 🤝 Run it on Google Colab

You can run _this chapter_ and play with it on Google Colaboratory: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ContinualAI/avalanche/blob/master/notebooks/from-zero-to-hero-tutorial/01\_introduction.ipynb)
You can run _this chapter_ and play with it on Google Colaboratory: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ContinualAI/avalanche/blob/master/notebooks/from-zero-to-hero-tutorial/01_introduction.ipynb)
2 changes: 1 addition & 1 deletion docs/gitbook/from-zero-to-hero-tutorial/03_benchmarks.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ print(split_mnist.test_stream)
# stores a set of the (optionally remapped) IDs of classes of patterns
# assigned to that experience.
print('--- Classes in each experience:')
split_mnist.classes_in_experience
print(split_mnist.original_classes_in_exp)
```

#### Train and Test Streams
Expand Down
12 changes: 6 additions & 6 deletions docs/gitbook/how-tos/avalanchedataset/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ description: Dealing with AvalancheDatasets

# AvalancheDataset

The `AvalancheDataset` is an implementation of the PyTorch `Dataset` class that comes with many useful out-of-the-box functionalities. For most users, the _AvalancheDataset_ can be used as a plain PyTorch Dataset that will return `x, y, t` elements. However, the AvalancheDataset is much more powerful than a simple PyTorch Dataset.
The `AvalancheDataset` is an implementation of the PyTorch `Dataset` class that comes with many useful out-of-the-box functionalities. For most users, the *AvalancheDataset* can be used as a plain PyTorch Dataset that will return `x, y, t` elements. However, the AvalancheDataset is much more powerful than a simple PyTorch Dataset.

**A serie of **_**Mini How-Tos**_ will guide you through the functionalities of the _AvalancheDataset_ and its subclasses:
**A serie of _Mini How-Tos_** will guide you through the functionalities of the *AvalancheDataset* and its subclasses:

* [Preamble: PyTorch Datasets](https://avalanche.continualai.org/how-tos/avalanchedataset/preamble-pytorch-datasets)
* [Creating AvalancheDatasets](https://avalanche.continualai.org/how-tos/avalanchedataset/creating-avalanchedatasets)
* [Advanced Transformations](https://avalanche.continualai.org/how-tos/avalanchedataset/advanced-transformations)
- [Preamble: PyTorch Datasets](https://avalanche.continualai.org/how-tos/avalanchedataset/preamble-pytorch-datasets)
- [Creating AvalancheDatasets](https://avalanche.continualai.org/how-tos/avalanchedataset/creating-avalanchedatasets)
- [Advanced Transformations](https://avalanche.continualai.org/how-tos/avalanchedataset/advanced-transformations)

Brefore jumping to the actual _Mini How-To_s, **we recommend having a look at the basic notions of Dataset and DataLoader by reading the** [**Preamble page**](https://avalanche.continualai.org/how-tos/avalanchedataset/preamble-pytorch-datasets).
Brefore jumping to the actual *Mini How-To*s, **we recommend having a look at the basic notions of Dataset and DataLoader by reading the [Preamble page](https://avalanche.continualai.org/how-tos/avalanchedataset/preamble-pytorch-datasets)**.
Loading

0 comments on commit 6eb8c81

Please sign in to comment.