lava-nc


Namelava-nc JSON
Version 0.9.0 PyPI version JSON
download
home_pagehttps://lava-nc.org/
SummaryA Software Framework for Neuromorphic Computing
upload_time2023-11-15 05:14:15
maintainer
docs_urlNone
authorIntel's Neuromorphic Computing Lab and the open source community
requires_python>=3.8,<3.11
license(BSD-3-Clause), (LGPL-2.1-or-later)
keywords neuromorphic ai artificial intelligence neural models spiking neural networks
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![image](https://user-images.githubusercontent.com/68661711/135301797-400e163d-71a3-45f8-b35f-e849e8c74f0c.png)
<p align="center"><b>
  A Software Framework for Neuromorphic Computing
</b></p>

[![Codacy Badge](https://app.codacy.com/project/badge/Grade/40792fa7db054279bdf7532e36f0cfab)](https://app.codacy.com/gh/lava-nc/lava/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/40792fa7db054279bdf7532e36f0cfab)](https://app.codacy.com/gh/lava-nc/lava/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage)

If you like lava and want to support it, the easiest way is to star our repo (click star in the upper right corner).

# Overview

Lava is an open source SW framework to develop applications for
neuromorphic hardware architectures. It provides developers with the abstractions
and tools to develop distributed and massively parallel applications. These
applications can be deployed to heterogeneous system architectures containing
conventional processors as well as neuromorphic chips that exploit event-based
message passing for communication. The Lava framework comprises high-level
libraries for deep learning, constrained optimization, and others for productive
algorithm development. It also includes tools to map those algorithms to
different types of hardware architectures.


<p align="center">
<img src="https://user-images.githubusercontent.com/68661711/135412508-4a93e20a-8b64-4723-a69b-de8f4b5902f7.png" alt="Lava organization" width="500"/>
</p>

Today Lava supports conventional CPUs and Intel's Loihi architecture, but
its compiler and runtime are open to extension for other architectures.

To learn more about the Lava Software Framework, please refer to the
detailed documentation at http://lava-nc.org/.

The Lava framework is licensed with permissive open source
BSD 3 licensing to highly encourage community contributions.
Lower level components in Lava, that map algorithms to different
hardware backends, are licensed with the LGPL-2.1 license to discourage
commercial proprietary forks. Specific sensitive components
supporting architectures like Intel Loihi may remain proprietary
to Intel and will be shared as extensions to eligible users.

>### Lava extension for Intel's Loihi
>The Lava extension for Loihi is available for members of the Intel Neuromorphic Research Community (INRC). The extension enables execution of Lava on Intel's Loihi hardware platform.
>
>Developers interested in using Lava with Loihi systems need to join the INRC. Loihi 1 and 2 research systems are currently not available commercially. Once a member of the INRC, developers will gain access to cloud-hosted Loihi systems or may be able to obtain physical Loihi systems on a loan basis.
>
>To join the INRC, visit [http://neuromorphic.intel.com](http://neuromorphic.intel.com) or email at [inrc_interest@intel.com](mailto:inrc_interest@intel.com).
>
> If you are already a member of the INRC, please read how to [get started with the Lava extension for Loihi](https://intel-ncl.atlassian.net/wiki/spaces/NAP/pages/1785856001/Get+started+with+the+Lava+extension+for+Loihi). This page is **only** accessible to members of the INRC.


# Getting started
The open-source Lava Software framework and its complementary algorithm
libraries are hosted at [http://github.com/lava-nc](http://github.com/lava-nc) and
the framework supports at minimimum CPU backends.

Note that you should install the core Lava repository [lava](http://github.com/lava-nc/lava)
before installing other Lava libraries such as [lava-optimization](http://github.com/lava-nc/lava-optimization)
or [lava-dl](http://github.com/lava-nc/lava-dl).

## Installing Lava from source

If you are interested in developing in Lava and modifying Lava source code,
we recommend cloning the repository and using `poetry` to setup Lava. You
will need to install the `poetry` Python package.

Open a **python 3** terminal and run based on the OS you are on:

### Linux/MacOS

```bash
cd $HOME
curl -sSL https://install.python-poetry.org | python3 -
git clone git@github.com:lava-nc/lava.git
cd lava
git checkout v0.9.0
./utils/githook/install-hook.sh
poetry config virtualenvs.in-project true
poetry install
source .venv/bin/activate
pytest

## See FAQ for more info: https://github.com/lava-nc/lava/wiki/Frequently-Asked-Questions-(FAQ)#install
```

### Windows

```powershell
# Commands using PowerShell
cd $HOME
git clone git@github.com:lava-nc/lava.git
cd lava
git checkout v0.9.0
python3 -m venv .venv
.venv\Scripts\activate
pip install -U pip
curl -sSL https://install.python-poetry.org | python3 -
poetry config virtualenvs.in-project true
poetry install
pytest
```

You should expect the following output after running the unit tests:

```
$ pytest
============================================== test session starts ==============================================
platform linux -- Python 3.8.10, pytest-7.0.1, pluggy-1.0.0
rootdir: /home/user/lava, configfile: pyproject.toml, testpaths: tests
plugins: cov-3.0.0
collected 205 items

tests/lava/magma/compiler/test_channel_builder.py .                                                       [  0%]
tests/lava/magma/compiler/test_compiler.py ........................                                       [ 12%]
tests/lava/magma/compiler/test_node.py ..                                                                 [ 13%]
tests/lava/magma/compiler/builder/test_channel_builder.py .                                               [ 13%]

...... pytest output ...

tests/lava/proc/sdn/test_models.py ........                                                               [ 98%]
tests/lava/proc/sdn/test_process.py ...                                                                   [100%]
=============================================== warnings summary ================================================

...... pytest output ...

src/lava/proc/lif/process.py                                                           38      0   100%
src/lava/proc/monitor/models.py                                                        27      0   100%
src/lava/proc/monitor/process.py                                                       79      0   100%
src/lava/proc/sdn/models.py                                                           159      9    94%   199-202, 225-231
src/lava/proc/sdn/process.py                                                           59      0   100%
-----------------------------------------------------------------------------------------------------------------TOTAL
                                                                                     4048    453    89%

Required test coverage of 85.0% reached. Total coverage: 88.81%
============================ 199 passed, 6 skipped, 2 warnings in 118.17s (0:01:58) =============================

```

## Alternative: Installing Lava via Conda

If you use the Conda package manager, you can simply install the Lava package
via:

```bash
conda install lava -c conda-forge
```

Alternatively with intel numpy and scipy:

```bash
conda create -n lava python=3.9 -c intel
conda activate lava
conda install -n lava -c intel numpy scipy
conda install -n lava -c conda-forge lava --freeze-installed
```

## Alternative: Installing Lava from pypi

If you would like to install Lava as a user you can install via pypi binaries.
Installing in this way does not give you access to run tests.

Open a Python terminal and run:

### Windows/MacOS/Linux

```bash
python -m venv .venv
source .venv/bin/activate ## Or Windows: .venv\Scripts\activate
pip install -U pip
pip install lava-nc
```

## Alternative: Installing Lava from binaries

You can also install Lava as a user with published Lava releases via
[GitHub Releases](https://github.com/lava-nc/lava/releases). Please download
the package and install it with the following commands. Installing in this way does not
give you access to run tests.

Open a Python terminal and run:

### Windows/MacOS/Linux

```bash
python -m venv .venv
source .venv/bin/activate ## Or Windows: .venv\Scripts\activate
pip install -U pip
# Substitute lava version needed for lava-nc-<version here>.tar.gz below
pip install lava-nc-0.9.0.tar.gz
```

## Linting, testing, documentation and packaging

```bash
# Install poetry
curl -sSL https://install.python-poetry.org | python3 -
poetry config virtualenvs.in-project true
poetry install
poetry shell

# Run linting
flakeheaven lint src/lava tests

# Run unit tests
pytest

# Create distribution
poetry build
#### Find builds at dist/

# Run Secuity Linting
bandit -r src/lava/.

#### If security linting fails run bandit directly
#### and format failures
bandit -r src/lava/. --format custom --msg-template '{abspath}:{line}: {test_id}[bandit]: {severity}: {msg}'
```
##
>Refer to the tutorials directory for in-depth as well as end-to-end tutorials on how to write Lava Processes, connect them, and execute the code.

# Stay in touch

To receive regular updates on the latest developments and releases of the Lava
Software Framework
please [subscribe to our newsletter](http://eepurl.com/hJCyhb).


            

Raw data

            {
    "_id": null,
    "home_page": "https://lava-nc.org/",
    "name": "lava-nc",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<3.11",
    "maintainer_email": "",
    "keywords": "neuromorphic,ai,artificial intelligence,neural models,spiking neural networks",
    "author": "Intel's Neuromorphic Computing Lab and the open source community",
    "author_email": "lava@intel.com",
    "download_url": "https://files.pythonhosted.org/packages/0a/7b/73fcf24ef10e5d26a807aa16436169355c15553de48b666d7c62e8f4f509/lava_nc-0.9.0.tar.gz",
    "platform": null,
    "description": "![image](https://user-images.githubusercontent.com/68661711/135301797-400e163d-71a3-45f8-b35f-e849e8c74f0c.png)\n<p align=\"center\"><b>\n  A Software Framework for Neuromorphic Computing\n</b></p>\n\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/40792fa7db054279bdf7532e36f0cfab)](https://app.codacy.com/gh/lava-nc/lava/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)\n[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/40792fa7db054279bdf7532e36f0cfab)](https://app.codacy.com/gh/lava-nc/lava/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage)\n\nIf you like lava and want to support it, the easiest way is to star our repo (click star in the upper right corner).\n\n# Overview\n\nLava is an open source SW framework to develop applications for\nneuromorphic hardware architectures. It provides developers with the abstractions\nand tools to develop distributed and massively parallel applications. These\napplications can be deployed to heterogeneous system architectures containing\nconventional processors as well as neuromorphic chips that exploit event-based\nmessage passing for communication. The Lava framework comprises high-level\nlibraries for deep learning, constrained optimization, and others for productive\nalgorithm development. It also includes tools to map those algorithms to\ndifferent types of hardware architectures.\n\n\n<p align=\"center\">\n<img src=\"https://user-images.githubusercontent.com/68661711/135412508-4a93e20a-8b64-4723-a69b-de8f4b5902f7.png\" alt=\"Lava organization\" width=\"500\"/>\n</p>\n\nToday Lava supports conventional CPUs and Intel's Loihi architecture, but\nits compiler and runtime are open to extension for other architectures.\n\nTo learn more about the Lava Software Framework, please refer to the\ndetailed documentation at http://lava-nc.org/.\n\nThe Lava framework is licensed with permissive open source\nBSD 3 licensing to highly encourage community contributions.\nLower level components in Lava, that map algorithms to different\nhardware backends, are licensed with the LGPL-2.1 license to discourage\ncommercial proprietary forks. Specific sensitive components\nsupporting architectures like Intel Loihi may remain proprietary\nto Intel and will be shared as extensions to eligible users.\n\n>### Lava extension for Intel's Loihi\n>The Lava extension for Loihi is available for members of the Intel Neuromorphic Research Community (INRC). The extension enables execution of Lava on Intel's Loihi hardware platform.\n>\n>Developers interested in using Lava with Loihi systems need to join the INRC. Loihi 1 and 2 research systems are currently not available commercially. Once a member of the INRC, developers will gain access to cloud-hosted Loihi systems or may be able to obtain physical Loihi systems on a loan basis.\n>\n>To join the INRC, visit [http://neuromorphic.intel.com](http://neuromorphic.intel.com) or email at [inrc_interest@intel.com](mailto:inrc_interest@intel.com).\n>\n> If you are already a member of the INRC, please read how to [get started with the Lava extension for Loihi](https://intel-ncl.atlassian.net/wiki/spaces/NAP/pages/1785856001/Get+started+with+the+Lava+extension+for+Loihi). This page is **only** accessible to members of the INRC.\n\n\n# Getting started\nThe open-source Lava Software framework and its complementary algorithm\nlibraries are hosted at [http://github.com/lava-nc](http://github.com/lava-nc) and\nthe framework supports at minimimum CPU backends.\n\nNote that you should install the core Lava repository [lava](http://github.com/lava-nc/lava)\nbefore installing other Lava libraries such as [lava-optimization](http://github.com/lava-nc/lava-optimization)\nor [lava-dl](http://github.com/lava-nc/lava-dl).\n\n## Installing Lava from source\n\nIf you are interested in developing in Lava and modifying Lava source code,\nwe recommend cloning the repository and using `poetry` to setup Lava. You\nwill need to install the `poetry` Python package.\n\nOpen a **python 3** terminal and run based on the OS you are on:\n\n### Linux/MacOS\n\n```bash\ncd $HOME\ncurl -sSL https://install.python-poetry.org | python3 -\ngit clone git@github.com:lava-nc/lava.git\ncd lava\ngit checkout v0.9.0\n./utils/githook/install-hook.sh\npoetry config virtualenvs.in-project true\npoetry install\nsource .venv/bin/activate\npytest\n\n## See FAQ for more info: https://github.com/lava-nc/lava/wiki/Frequently-Asked-Questions-(FAQ)#install\n```\n\n### Windows\n\n```powershell\n# Commands using PowerShell\ncd $HOME\ngit clone git@github.com:lava-nc/lava.git\ncd lava\ngit checkout v0.9.0\npython3 -m venv .venv\n.venv\\Scripts\\activate\npip install -U pip\ncurl -sSL https://install.python-poetry.org | python3 -\npoetry config virtualenvs.in-project true\npoetry install\npytest\n```\n\nYou should expect the following output after running the unit tests:\n\n```\n$ pytest\n============================================== test session starts ==============================================\nplatform linux -- Python 3.8.10, pytest-7.0.1, pluggy-1.0.0\nrootdir: /home/user/lava, configfile: pyproject.toml, testpaths: tests\nplugins: cov-3.0.0\ncollected 205 items\n\ntests/lava/magma/compiler/test_channel_builder.py .                                                       [  0%]\ntests/lava/magma/compiler/test_compiler.py ........................                                       [ 12%]\ntests/lava/magma/compiler/test_node.py ..                                                                 [ 13%]\ntests/lava/magma/compiler/builder/test_channel_builder.py .                                               [ 13%]\n\n...... pytest output ...\n\ntests/lava/proc/sdn/test_models.py ........                                                               [ 98%]\ntests/lava/proc/sdn/test_process.py ...                                                                   [100%]\n=============================================== warnings summary ================================================\n\n...... pytest output ...\n\nsrc/lava/proc/lif/process.py                                                           38      0   100%\nsrc/lava/proc/monitor/models.py                                                        27      0   100%\nsrc/lava/proc/monitor/process.py                                                       79      0   100%\nsrc/lava/proc/sdn/models.py                                                           159      9    94%   199-202, 225-231\nsrc/lava/proc/sdn/process.py                                                           59      0   100%\n-----------------------------------------------------------------------------------------------------------------TOTAL\n                                                                                     4048    453    89%\n\nRequired test coverage of 85.0% reached. Total coverage: 88.81%\n============================ 199 passed, 6 skipped, 2 warnings in 118.17s (0:01:58) =============================\n\n```\n\n## Alternative: Installing Lava via Conda\n\nIf you use the Conda package manager, you can simply install the Lava package\nvia:\n\n```bash\nconda install lava -c conda-forge\n```\n\nAlternatively with intel numpy and scipy:\n\n```bash\nconda create -n lava python=3.9 -c intel\nconda activate lava\nconda install -n lava -c intel numpy scipy\nconda install -n lava -c conda-forge lava --freeze-installed\n```\n\n## Alternative: Installing Lava from pypi\n\nIf you would like to install Lava as a user you can install via pypi binaries.\nInstalling in this way does not give you access to run tests.\n\nOpen a Python terminal and run:\n\n### Windows/MacOS/Linux\n\n```bash\npython -m venv .venv\nsource .venv/bin/activate ## Or Windows: .venv\\Scripts\\activate\npip install -U pip\npip install lava-nc\n```\n\n## Alternative: Installing Lava from binaries\n\nYou can also install Lava as a user with published Lava releases via\n[GitHub Releases](https://github.com/lava-nc/lava/releases). Please download\nthe package and install it with the following commands. Installing in this way does not\ngive you access to run tests.\n\nOpen a Python terminal and run:\n\n### Windows/MacOS/Linux\n\n```bash\npython -m venv .venv\nsource .venv/bin/activate ## Or Windows: .venv\\Scripts\\activate\npip install -U pip\n# Substitute lava version needed for lava-nc-<version here>.tar.gz below\npip install lava-nc-0.9.0.tar.gz\n```\n\n## Linting, testing, documentation and packaging\n\n```bash\n# Install poetry\ncurl -sSL https://install.python-poetry.org | python3 -\npoetry config virtualenvs.in-project true\npoetry install\npoetry shell\n\n# Run linting\nflakeheaven lint src/lava tests\n\n# Run unit tests\npytest\n\n# Create distribution\npoetry build\n#### Find builds at dist/\n\n# Run Secuity Linting\nbandit -r src/lava/.\n\n#### If security linting fails run bandit directly\n#### and format failures\nbandit -r src/lava/. --format custom --msg-template '{abspath}:{line}: {test_id}[bandit]: {severity}: {msg}'\n```\n##\n>Refer to the tutorials directory for in-depth as well as end-to-end tutorials on how to write Lava Processes, connect them, and execute the code.\n\n# Stay in touch\n\nTo receive regular updates on the latest developments and releases of the Lava\nSoftware Framework\nplease [subscribe to our newsletter](http://eepurl.com/hJCyhb).\n\n",
    "bugtrack_url": null,
    "license": "(BSD-3-Clause), (LGPL-2.1-or-later)",
    "summary": "A Software Framework for Neuromorphic Computing",
    "version": "0.9.0",
    "project_urls": {
        "Discussions": "https://github.com/lava-nc/lava/discussions",
        "Frequently Asked Questions": "https://github.com/lava-nc/lava/wiki/Frequently-Asked-Questions-(FAQ)",
        "Homepage": "https://lava-nc.org/",
        "Issue and Bug Tracker": "https://github.com/lava-nc/lava/issues",
        "Questions and Answers": "https://github.com/lava-nc/lava/discussions/categories/q-a",
        "Repository": "https://github.com/lava-nc/lava"
    },
    "split_keywords": [
        "neuromorphic",
        "ai",
        "artificial intelligence",
        "neural models",
        "spiking neural networks"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0344699510f7c70192e71be7f9e0ebc7505d3d0aff8b3f803aa3606b64fbc2ea",
                "md5": "5970698897844d2eee3447cdd6010de4",
                "sha256": "c01fb140c9712ab4a47170bbd084bd7bcc283f196fa75470763e1fb089746ba1"
            },
            "downloads": -1,
            "filename": "lava_nc-0.9.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5970698897844d2eee3447cdd6010de4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<3.11",
            "size": 7712837,
            "upload_time": "2023-11-15T05:14:10",
            "upload_time_iso_8601": "2023-11-15T05:14:10.838551Z",
            "url": "https://files.pythonhosted.org/packages/03/44/699510f7c70192e71be7f9e0ebc7505d3d0aff8b3f803aa3606b64fbc2ea/lava_nc-0.9.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0a7b73fcf24ef10e5d26a807aa16436169355c15553de48b666d7c62e8f4f509",
                "md5": "d0eaa121d4c7a23a055326d9219d39ee",
                "sha256": "213dabd8cbe360a647d877780d7542d03eaf9761c03cfbfb63f8c95920fc11ec"
            },
            "downloads": -1,
            "filename": "lava_nc-0.9.0.tar.gz",
            "has_sig": false,
            "md5_digest": "d0eaa121d4c7a23a055326d9219d39ee",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<3.11",
            "size": 43451613,
            "upload_time": "2023-11-15T05:14:15",
            "upload_time_iso_8601": "2023-11-15T05:14:15.113861Z",
            "url": "https://files.pythonhosted.org/packages/0a/7b/73fcf24ef10e5d26a807aa16436169355c15553de48b666d7c62e8f4f509/lava_nc-0.9.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-15 05:14:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "lava-nc",
    "github_project": "lava",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "lava-nc"
}
        
Elapsed time: 0.13660s