Stable-SSL: the Self-Supervised Learning Library by Researchers for Researchers

Stable-SSL: the Self-Supervised Learning Library by Researchers for Researchers#

You got a research idea? It shouldn’t take you more than 10 minutes to start from scratch and get it running with the ability to produce high quality figures/tables from the results: that’s the goal of stable-SSL.

We achieve that by taking the best–and only the best–from the most eponymous AI libraries: PytorchLightning, VISSL, Wandb, Hydra, Submitit.

stable-SSL implements all the basic boilerplate code, including data loader, logging, checkpointing, optimization, etc. You only need to implement 3 methods to get started: your loss, your model, and your prediction (see example below). But if you want to customize more things, simply inherit the base BaseModel and override any method! This could include different metrics, different data samples, different training loops, etc.

Why stable-SSL?#

A quick search of AI libraries or Self Supervised Learning libraries will return hundreds of results. 99% will be independent project-centric libraries that can’t be reused for general purpose AI research. The other 1% includes:

  • Framework libraries such as PytorchLightning that focus on production needs.

  • SSL libraries such as VISSL, FFCV-SSL, LightlySSL that are too rigid, often discontinued or not maintained, or commercial.

  • Standalone libraries such as Wandb, submitit, Hydra that do not offer enough boilerplate for AI research.

Hence our goal is to fill that void.

Installation#

The library is not yet available on PyPI. You can install it from the source code, as follows.

pip install -e .

Or you can also run:

pip install -U git+https://github.com/rbalestr-lab/stable-SSL