lebrice / Sequoia

The Research Tree - A playground for research at the intersection of Continual, Reinforcement, and Self-Supervised Learning.
GNU General Public License v3.0
191 stars 18 forks source link

Sequoia - The Research Tree

A Playground for research at the intersection of Continual, Reinforcement, and Self-Supervised Learning.

Note: This project is not being actively developed at the moment. If you encounter any difficulties, please create an issue and I'll help you out.

If you have any questions or comments, please make an issue!

Motivation:

Most applied ML research generally either proposes new Settings (research problems), new Methods (solutions to such problems), or both.

The goal of this repo is to:

Installation

Requires python >= 3.7

Basic installation:

$ git clone https://www.github.com/lebrice/Sequoia.git
$ pip install -e Sequoia

Optional Addons

You can also install optional "addons" for Sequoia, each of which either adds new Methods, new environments/datasets, or both. using either the usual extras_require feature of setuptools, or by pip-installing other repositories which register Methods for Sequoia using an entry_point in their setup.py file.

pip install -e Sequoia[all|<plugin name>]

Here are some of the optional addons:

See the setup.py file for all the optional extras.

Additional Installation Steps for Mac

Install the latest XQuartz app from here: https://www.xquartz.org/releases/index.html

Then run the following commands on the terminal:

mkdir /tmp/.X11-unix 
sudo chmod 1777 /tmp/.X11-unix 
sudo chown root /tmp/.X11-unix/

Documentation overview:

Current Settings & Assumptions:

Setting RL vs SL clear task boundaries? Task boundaries given? Task labels at training time? task labels at test time Stationary context? Fixed action space
Continual RL RL no no no no no no(?)
Discrete Task-Agnostic RL RL yes yes no no no no(?)
Incremental RL RL yes yes yes no no no(?)
Task-Incremental RL RL yes yes yes yes no no(?)
Traditional RL RL yes yes yes no yes no(?)
Multi-Task RL RL yes yes yes yes yes no(?)
Continual SL SL no no no no no no
Discrete Task-Agnostic SL SL yes no no no no no
(Class) Incremental SL SL yes yes no no no no
Domain-Incremental SL SL yes yes yes no no yes
Task-Incremental SL SL yes yes yes yes no no
Traditional SL SL yes yes yes no yes no
Multi-Task SL SL yes yes yes yes yes no
<!-- Class-Incremental SL SL yes yes no no no -->

Notes

Running experiments

--> (Reminder) First, take a look at the Examples <--

Directly in code:

from sequoia.settings import TaskIncrementalSLSetting
from sequoia.methods import BaseMethod
# Create the setting
setting = TaskIncrementalSLSetting(dataset="mnist")
# Create the method
method = BaseMethod(max_epochs=1)
# Apply the setting to the method to generate results.
results = setting.apply(method)
print(results.summary())

Command-line:

$ sequoia --help
usage: sequoia [-h] [--version] {run,sweep,info} ...

Sequoia - The Research Tree 

Used to run experiments, which consist in applying a Method to a Setting.

optional arguments:
  -h, --help        show this help message and exit
  --version         Displays the installed version of Sequoia and exits.

command:
  Command to execute

  {run,sweep,info}
    run             Run an experiment on a given setting.
    sweep           Run a hyper-parameter optimization sweep.
    info            Displays some information about a Setting or Method.

For example:

$ sequoia run [--debug] <setting> (setting arguments) <method> (method arguments)
$ sequoia sweep [--debug] <setting> (setting arguments) <method> (method arguments)
$ sequoia info [setting or method]

For a detailed description of all the arguments, use the --help command for any of the actions:

$ sequoia --help
$ sequoia run --help
$ sequoia run <some_setting> --help
$ sequoia run <some_setting> <some_method> --help
$ sequoia sweep --help
$ sequoia sweep <some_setting> --help
$ sequoia sweep <some_setting> <some_method> --help

For example:

$ sequoia run --debug task_incremental_sl --dataset mnist random_baseline

For example:

More questions? Please let us know by creating an issue or posting in the discussions!