sequel-core


Namesequel-core JSON
Version 0.0.2 PyPI version JSON
download
home_page
SummaryA Continual Learning Framework for both Jax and PyTorch.
upload_time2023-04-18 15:50:11
maintainer
docs_urlNone
author
requires_python>=3.10
license
keywords continual learning pytorch jax
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Sequel: A Continual Learning Library in PyTorch and JAX

The goal of this library is to provide a simple and easy to use framework for continual learning. The library is written in PyTorch and JAX and provides a simple interface to run experiments. The library is still in development and we are working on adding more algorithms and datasets.

- Documetation: https://nik-dim.github.io/sequel-site/
- Reproducibility Board: https://nik-dim.github.io/sequel-site/reproducibility/ 
- Weights&Biases: https://wandb.ai/nikdim/SequeL 
## Installation

The library can be installed via pip:
```bash
pip install sequel-core
```

Alternatively, you can install the library from source:
```bash
git clone https://github.com/nik-dim/sequel.git
python3 -m build
```

or use the library by cloning the repository. In order to use the library, you need to install the dependencies. This can be done via the `requirements.txt` file. We recommend to use a conda environment for this. The following commands will create a conda environment with the required packages and activate it:
```bash
# create the conda environment
conda create -n sequel -y python=3.10 cuda cudatoolkit cuda-nvcc -c nvidia -c anaconda
conda activate sequel 

# install all required packages
pip install -r requirements.txt

# Optional: Depending on the machine, the next command might be needed to enable CUDA support for GPUs
pip install jax[cuda11_cudnn82] -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
```


## Run an experiment

For some examples, you can modify the `example_pytorch.py` and `example_jax.py` files, or run:
```bash
# example experiment on PyTorch
python example_pytorch.py

# ...and in JAX
python example_jax.py
```

Experiments are located in the `examples/` directory in `configs`. In order to run an experiment you simply do the following:

```bash
python main.py +experiment=EXPERIMENT_DIR/EXPERRIMENT

# examples
python main.py +examples=ewc_rotatedmnist       mode=pytorch        # or mode=jax
python main.py +examples=mcsgd_rotatedmnist     mode=pytorch        # or mode=jax
```

In order to create your own experiment you follow the template of the experiments in `configs/examples/`. You override the defaults so that e.g. another algorithm is selected and you specify the training details. To run multiple experiments with different configs, the `--multirun` flag of [Hydra](https://hydra.cc/docs) can be used. 
For instance:
```bash
python main.py --multirun +examples=ewc_rotatedmnist \
     mode=pytorch optimizer.lr=0.01,0.001 \
     benchmark.batch_size=128,256 \ 
     training.epochs_per_task=1 # online setting
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "sequel-core",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "continual learning,pytorch,jax",
    "author": "",
    "author_email": "Nikolaos Dimitriadis <nikolaos.dimitriadis@epfl.ch>",
    "download_url": "https://files.pythonhosted.org/packages/a1/17/950f33e5e23f8a242181d2b56f7bcc315c2994ab7df77bb0b3872334ebf3/sequel-core-0.0.2.tar.gz",
    "platform": null,
    "description": "# Sequel: A Continual Learning Library in PyTorch and JAX\n\nThe goal of this library is to provide a simple and easy to use framework for continual learning. The library is written in PyTorch and JAX and provides a simple interface to run experiments. The library is still in development and we are working on adding more algorithms and datasets.\n\n- Documetation: https://nik-dim.github.io/sequel-site/\n- Reproducibility Board: https://nik-dim.github.io/sequel-site/reproducibility/ \n- Weights&Biases: https://wandb.ai/nikdim/SequeL \n## Installation\n\nThe library can be installed via pip:\n```bash\npip install sequel-core\n```\n\nAlternatively, you can install the library from source:\n```bash\ngit clone https://github.com/nik-dim/sequel.git\npython3 -m build\n```\n\nor use the library by cloning the repository. In order to use the library, you need to install the dependencies. This can be done via the `requirements.txt` file. We recommend to use a conda environment for this. The following commands will create a conda environment with the required packages and activate it:\n```bash\n# create the conda environment\nconda create -n sequel -y python=3.10 cuda cudatoolkit cuda-nvcc -c nvidia -c anaconda\nconda activate sequel \n\n# install all required packages\npip install -r requirements.txt\n\n# Optional: Depending on the machine, the next command might be needed to enable CUDA support for GPUs\npip install jax[cuda11_cudnn82] -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html\n```\n\n\n## Run an experiment\n\nFor some examples, you can modify the `example_pytorch.py` and `example_jax.py` files, or run:\n```bash\n# example experiment on PyTorch\npython example_pytorch.py\n\n# ...and in JAX\npython example_jax.py\n```\n\nExperiments are located in the `examples/` directory in `configs`. In order to run an experiment you simply do the following:\n\n```bash\npython main.py +experiment=EXPERIMENT_DIR/EXPERRIMENT\n\n# examples\npython main.py +examples=ewc_rotatedmnist       mode=pytorch        # or mode=jax\npython main.py +examples=mcsgd_rotatedmnist     mode=pytorch        # or mode=jax\n```\n\nIn order to create your own experiment you follow the template of the experiments in `configs/examples/`. You override the defaults so that e.g. another algorithm is selected and you specify the training details. To run multiple experiments with different configs, the `--multirun` flag of [Hydra](https://hydra.cc/docs) can be used. \nFor instance:\n```bash\npython main.py --multirun +examples=ewc_rotatedmnist \\\n     mode=pytorch optimizer.lr=0.01,0.001 \\\n     benchmark.batch_size=128,256 \\ \n     training.epochs_per_task=1 # online setting\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A Continual Learning Framework for both Jax and PyTorch.",
    "version": "0.0.2",
    "split_keywords": [
        "continual learning",
        "pytorch",
        "jax"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "363753a4e3655233fc4270d52f00ed280220f92b17e8530e72752b909a0c2756",
                "md5": "1272d0ad8089972dfc618027df03ece8",
                "sha256": "769ce325ff381ae90736eee7dbfc5bf1612c46484fb60d541c47895498ad3e1f"
            },
            "downloads": -1,
            "filename": "sequel_core-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1272d0ad8089972dfc618027df03ece8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 88726,
            "upload_time": "2023-04-18T15:50:09",
            "upload_time_iso_8601": "2023-04-18T15:50:09.225426Z",
            "url": "https://files.pythonhosted.org/packages/36/37/53a4e3655233fc4270d52f00ed280220f92b17e8530e72752b909a0c2756/sequel_core-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a117950f33e5e23f8a242181d2b56f7bcc315c2994ab7df77bb0b3872334ebf3",
                "md5": "69cea23a7266e8dddd3f38dfcaf883be",
                "sha256": "36a980ffd8b44b37b8f9a40ef1c0bafa6a586081bf2d5d20408db864f2a03fce"
            },
            "downloads": -1,
            "filename": "sequel-core-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "69cea23a7266e8dddd3f38dfcaf883be",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 59766,
            "upload_time": "2023-04-18T15:50:11",
            "upload_time_iso_8601": "2023-04-18T15:50:11.369482Z",
            "url": "https://files.pythonhosted.org/packages/a1/17/950f33e5e23f8a242181d2b56f7bcc315c2994ab7df77bb0b3872334ebf3/sequel-core-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-18 15:50:11",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "sequel-core"
}
        
Elapsed time: 1.60453s