nerlnet

Nerlnet is a framework for research and development of distributed machine learning models on IoT

https://github.com/leondavi/nerlnet

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    3 of 15 committers (20.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.1%) to scientific vocabulary

Keywords

ai artificial-intelligence-projects cowboy distributed-machine-learning distributed-ml distributed-systems erlang fault-tolerance federated federated-learning federated-learning-framework iot machine-learning ml nerlnet neural-network python
Last synced: 6 months ago · JSON representation ·

Repository

Nerlnet is a framework for research and development of distributed machine learning models on IoT

Basic Info
  • Host: GitHub
  • Owner: leondavi
  • License: gpl-3.0
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 66 MB
Statistics
  • Stars: 50
  • Watchers: 4
  • Forks: 9
  • Open Issues: 6
  • Releases: 17
Topics
ai artificial-intelligence-projects cowboy distributed-machine-learning distributed-ml distributed-systems erlang fault-tolerance federated federated-learning federated-learning-framework iot machine-learning ml nerlnet neural-network python
Created almost 6 years ago · Last pushed 6 months ago
Metadata Files
Readme Contributing License Code of conduct Citation Codeowners

README.md

Version Contributors Issues Discord
LinkedIn YouTube Hugging Face

NErlNet

Nerlnet is an open-source framework designed for researching and deploying distributed machine learning algorithms on IoT devices. It offers comprehensive insights into both edge devices running neural network models and the performance and statistics of network operations. With the ability to simulate distributed ML clusters on a single machine or across multiple machines, Nerlnet enables seamless deployment of these clusters—with minimal modifications—onto various types of IoT devices.

By streamlining the setup of distributed clusters composed of multiple edge models, Nerlnet provides full control and monitoring over communication flows. Its Python API empowers users to manage experiments efficiently, collect data, and analyze performance metrics throughout the research process.

Nerlnet library combines the following languages to achieve a stable and efficient distributed ML system framework:
• The communication layer of Nerlnet is based on an Cowboy - an HTTP web server open-source library.
• ML on the edge of the distributed cluster is based on OpenNN library, an open-source project of Cpp Neural Network library.
• Management of Nerlnet cluster - An HTTP server of Flask communicates with Nerlnet's main server to control the cluster's entities.

image image image image

Nerlnet cluster is defined by three configuration files (Json files):

  • Distributed Configuration that defines entities of Nerlnet: Source, Router, Client.
    • A client is a host of workers. A worker is a NN model that can move between phases of train and predict.
    • Source generates data streams that are sent to workers.
    • Router controls the data flow through Nerlnet cluster.

References and libraries:

  • OpenNN, an open-source neural networks library for machine learning.
  • Cowboy an HTTP server for Erlang/OTP.
  • NIFPP C++11 Wrapper for Erlang NIF API.
  • Rebar3, an Erlang tool that makes it easy to create, develop, and release Erlang libraries, applications, and systems in a repeatable manner.
  • Simple Cpp Logger, simple cpp logger headers-only implementation.

Nerlnet is developed by David Leon, Dr. Yehuda Ben-Shimol, and the community of Nerlnet open-source contributors.
Academic researchers can use Nerlnet for free, provided they cite this repository.

Nerlnet Architecture Example:

Nerlnet Architecture

Build and Run Nerlnet:

Recommended cmake version 3.26
Minimum erlang version otp 25 (Tested 24,25,26,28)
Minimum gcc/g++ version 10.3.0

On every device that hosts Nerlnet cluster entities, do the following steps:

  1. Clone this repository with its subomdules git clone --recurse-submodules <link to this repo> NErlNet
  2. Run sudo ./NerlnetInstall.sh
    2.1 With argument -i script builds and installs Erlang (OTP 28), and CMake from source. (validate that erlang is not installed before executing installation from source)
    2.2 On successful installation, NErlNet directory is accessible
        via the following path: /usr/local/lib/nerlnet-lib
  3. Run ./NerlnetBuild.sh
  4. Test Nerlnet by running: ./tests/NerlnetFullFlowTest.sh
  5. Nerlplanner is a Nerlnet tool to generate required jsons files to setup a distributed system of Nerlnet.
    To use NerlPlanner execute ./NerlPlanner.sh.
    Create json files of distributed configurations, connection map and experiment flow as follows:
  6. dc_<any name>.json
  7. conn_<any name>.json
  8. exp_<any name>.json
  9. Run ./NerlnetRun.sh.
  10. On API-Server device, Start Jupyter NB with ./NerlnetJupyterLaunch.sh and follow ApiServerInstance.help() and examples.

Python API and Jupyter-lab (For Api-Server):

Minimum Python version: 3.8

Communication with Nerlnet is done through a simple python API that can be easily used through Jupyter notebook.
The API allows the user to collect statistics insights of a distributed machine learning network:
Number of messages, throughput, loss, predictions, models performance, etc.

Instructions

  1. Open a jupyter lab environment using ./NerlnetJupyterLaunch.sh -d <experiment_direcotry>
    1.1 Use -h to see the help menu of NerlnetJupyterLaunch.sh script.
    1.2 If --no-venv option is selected then required modules can be read from src_py/requirements.txt.
  2. Read the instructions of importing Api-Server within the generated readme.md file inside folder.
  3. Follow the Example Notebook

Distributed ML on The Edge

Distributed ML on the edge - A new evolution step of AI.

https://github.com/leondavi/NErlNet/assets/18975070/15a3957a-3fd6-4fb2-a365-7e1578468298

Gratitudes

Amazon AWS

A grant of AWS credits as part of AWSOpen program for open source projects (2025-2027).

Microsoft Azure


A grant of Azure credits as part of Microsoft’s Azure credits for open source projects program (2024-2025).

Owner

  • Name: David
  • Login: leondavi
  • Kind: user
  • Location: Israel
  • Company: Mobileye

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Leon"
  given-names: "David"
  orcid: "https://orcid.org/0000-0001-8036-9964"
- family-names: "Ben-Shimol"
  given-names: "Yehuda"
  orcid: "https://orcid.org/0000-0002-4905-2085"
title: "NErlNet"
version: 1.5.2
date-released: 2024-07-18
url: "https://github.com/leondavi/NErlNet"

GitHub Events

Total
  • Release event: 2
  • Watch event: 11
  • Push event: 40
  • Pull request review event: 2
  • Pull request review comment event: 2
  • Gollum event: 4
  • Pull request event: 29
  • Fork event: 3
  • Create event: 12
Last Year
  • Release event: 2
  • Watch event: 11
  • Push event: 40
  • Pull request review event: 2
  • Pull request review comment event: 2
  • Gollum event: 4
  • Pull request event: 29
  • Fork event: 3
  • Create event: 12

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 824
  • Total Committers: 15
  • Avg Commits per committer: 54.933
  • Development Distribution Score (DDS): 0.745
Top Committers
Name Email Commits
David d****n@o****l 210
David Leon t****k@g****m 194
haran h****h@g****m 184
zivmo99 x****l 81
dordor7 d****x@g****m 73
Ziv x****9@w****l 25
evgenyan95 e****n@p****l 24
evgeny e****n@p****c 12
Ziv z****l@p****l 6
aslan a****a@p****l 6
yehuda ben-shimol b****a@g****m 3
aslan a****n@c****m 2
zivm99 z****9@g****m 2
Tal K 5****k@u****m 1
The Gitter Badger b****r@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 0
  • Total pull requests: 18
  • Average time to close issues: N/A
  • Average time to close pull requests: about 7 hours
  • Total issue authors: 0
  • Total pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 7
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 18
  • Average time to close issues: N/A
  • Average time to close pull requests: about 7 hours
  • Issue authors: 0
  • Pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 7
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • leondavi (18)
  • GuyPerets106 (4)
  • Orisadek (2)
  • halfway258 (1)
Pull Request Authors
  • leondavi (62)
  • GuyPerets106 (18)
  • NoaShapira8 (15)
  • ohad123 (7)
  • Orisadek (6)
  • eltociear (1)
  • dolby360 (1)
Top Labels
Issue Labels
bug (5) enhancement (1)
Pull Request Labels
bug (2)

Dependencies

src_py/requirements.txt pypi
  • Flask >=2.1.2
  • Flask-RESTful >=0.3.9
  • ipython >=8.3.0
  • jupyterlab >=3.4.2
  • matplotlib >=3.5.2
  • numpy >=1.22.4
  • opencv-python >=4.5.5.64
  • pandas >=1.4.2
  • requests >=2.27.1
  • scikit-learn >=1.1.1
  • scipy >=1.8.1
.github/workflows/pr.yml actions
  • actions/checkout v3 composite
.github/workflows/update_image.yml actions
  • actions/checkout v2 composite
  • docker/login-action v2 composite
Dockerfile docker
  • ubuntu latest build
src_py/nerlPlanner/requirements.txt pypi
  • PySimpleGUI ==4.60.5
  • graphviz ==0.20.1
  • pydot ==1.4.2
  • pydotplus ==2.0.2
src_erl/NerlMonitor/src/requirements.txt pypi
  • PySimpleGUI ==4.60.5
  • matplotlib ==3.7.1
  • nest-asyncio ==1.5.7
  • networkx ==3.1