{"id":13627364,"url":"https://github.com/leondavi/NErlNet","last_synced_at":"2025-04-16T19:31:36.643Z","repository":{"id":37233215,"uuid":"263516562","full_name":"leondavi/NErlNet","owner":"leondavi","description":"Nerlnet is a distributed machine learning platform for experiments and IoT deployment.","archived":false,"fork":false,"pushed_at":"2024-06-27T15:22:32.000Z","size":18571,"stargazers_count":30,"open_issues_count":5,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-06-27T17:35:27.079Z","etag":null,"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"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leondavi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"docs/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-13T03:34:41.000Z","updated_at":"2024-07-08T17:40:12.523Z","dependencies_parsed_at":"2024-01-30T00:25:23.089Z","dependency_job_id":"64ad1ae3-0e71-4d99-8828-528b9f67c66d","html_url":"https://github.com/leondavi/NErlNet","commit_stats":{"total_commits":824,"total_committers":15,"mean_commits":54.93333333333333,"dds":0.7451456310679612,"last_synced_commit":"9c00e68b33ab6b07685e4d7d184ebbdeb54f9aff"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leondavi%2FNErlNet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leondavi%2FNErlNet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leondavi%2FNErlNet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leondavi%2FNErlNet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leondavi","download_url":"https://codeload.github.com/leondavi/NErlNet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249268555,"owners_count":21240943,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"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"],"created_at":"2024-08-01T22:00:33.293Z","updated_at":"2025-04-16T19:31:31.634Z","avatar_url":"https://github.com/leondavi.png","language":"Python","funding_links":[],"categories":["Projects by main language","Open Source Projects"],"sub_categories":["erlang"],"readme":"![Version](https://img.shields.io/github/v/release/leondavi/NErlNet)\n![Contributors](https://img.shields.io/github/contributors/leondavi/NErlNet)\n![Issues](https://img.shields.io/github/issues/leondavi/NErlNet)\n[![Discord](https://shields.microej.com/discord/914616114204516393)](https://discord.gg/xwBTbzER)  \n[![LinkedIn](https://img.shields.io/badge/Linkedin-%230077B5.svg?logo=linkedin\u0026logoColor=white)](https://www.linkedin.com/company/nerlnet)\n[![YouTube](https://img.shields.io/badge/YouTube-%23FF0000.svg?logo=YouTube\u0026logoColor=white)](https://www.youtube.com/channel/UCnnWPPKiHioTBy7Zq5shrQw)\n[![Hugging Face](https://img.shields.io/badge/Hugging%20Face-FFD21E?logo=huggingface\u0026logoColor=000)](https://huggingface.co/Nerlnet)\n\n# NErlNet\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"NerlnetLogo.png\" width=\"200\" title=\"NerlNet\"\u003e\n\u003c/p\u003e\n\nNerlnet is an open-source framework for research and deployment of distributed machine learning algorithms on IoT devices. It provides comprehensive insights into both edge devices that run neural network models and network performance and statistics. Nerlnet can simulate distributed ML clusters on a single or multiple machines and deploy these clusters, with minor changes, on various kinds of IoT devices.  \n\nNerlnet simplifies the setup of a distributed cluster that consists of many models on its edge, communication flow can be fully controlled and monitored, and Nerlnet's Python API allows users to manage and gather data from the distributed cluster throughout the experiment.  \n\nNerlnet library combines the following languages to achieve a stable and efficient distributed ML system framework:  \n• The communication layer of Nerlnet is based on an Cowboy - an HTTP web server open-source library.  \n• ML on the edge of the distributed cluster is based on OpenNN library, an open-source project of Cpp Neural Network library.  \n• Managemnt of Nerlnet cluster - An HTTP server of Flask communicates with Nerlnet's main server to control the cluster's entities.  \n\n![image](https://user-images.githubusercontent.com/18975070/144730156-5bd03ad7-fc5f-45e9-8b4e-62d582af2200.png) \n![image](https://user-images.githubusercontent.com/18975070/144730182-c535b20a-a5f9-4d4f-8632-77d49732f17f.png) \n![image](https://user-images.githubusercontent.com/18975070/144730189-4bad4fba-e559-45a6-b163-d3e5d7d87e1f.png) \n![image](https://user-images.githubusercontent.com/18975070/144730205-5a665819-4be0-40aa-88e5-868ba99aab17.png)\n \n### Nerlnet cluster is defined by three configuration files (Json files):\n- Distributed Configuration that defines entities of Nerlnet: Source, Router, Client.\n  - A client is a host of workers. A worker is a NN model that can move between phases of train and predict.\n  - Source generates data streams that are sent to workers.\n  - Router controls the data flow through Nerlnet cluster.\n\n### References and libraries:\n- [OpenNN](https://www.opennn.net/), an open-source neural networks library for machine learning.   \n- [Cowboy](https://github.com/ninenines/cowboy) an HTTP server for Erlang/OTP.  \n- [NIFPP](https://github.com/goertzenator/nifpp) C++11 Wrapper for Erlang NIF API.   \n- [Rebar3](https://github.com/erlang/rebar3), an Erlang tool that makes it easy to create, develop, and release Erlang libraries, applications, and systems in a repeatable manner.\n- [Simple Cpp Logger](https://github.com/nadrino/simple-cpp-logger), simple cpp logger headers-only implementation.\n\nNerlnet is developed by David Leon, Dr. Yehuda Ben-Shimol, and the community of Nerlnet open-source contributors.  \nAcademic researchers can use Nerlnet for free, provided they cite this repository.  \n\n### Nerlnet Architecture Example:\n![Nerlnet Architecture](https://user-images.githubusercontent.com/18975070/141692829-f0cdca7d-96d1-43b0-920a-5821a14242f7.jpg)\n\n# Build and Run Nerlnet:\nRecommended cmake version 3.26   \nMinimum erlang version otp 25 (Tested 24,25,26)   \nMinimum gcc/g++ version 10.3.0   \n\n### On every device that hosts Nerlnet cluster entities, do the following steps:\n\n1. Clone this repository with its subomdules ```git clone --recurse-submodules \u003clink to this repo\u003e NErlNet```  \n2. Run ```sudo ./NerlnetInstall.sh```  \n  2.1 With argument -i script builds and installs Erlang (OTP 25), and CMake from source.\n      (validate that erlang is not installed before executing installation from source)  \n  2.2 On successful installation, NErlNet directory is accessible  \n      via the following path: ```/usr/local/lib/nerlnet-lib```\n3. Run ```./NerlnetBuild.sh```\n4. Test Nerlnet by running: ```./tests/NerlnetFullFlowTest.sh```\n5. [Nerlplanner](https://github.com/leondavi/NErlNet/wiki/NerlPlanner) is a Nerlnet tool to generate required jsons files to setup a distributed system of Nerlnet.  \nTo use NerlPlanner execute ```./NerlPlanner.sh```.  \nCreate json files of distributed configurations, connection map and experiment flow as follows:  \n- dc_\\\u003cany name\\\u003e.json  \n- conn_\\\u003cany name\\\u003e.json  \n- exp_\\\u003cany name\\\u003e.json       \n6. Run ```./NerlnetRun.sh```.\n7. On API-Server device, Start Jupyter NB with ```./NerlnetJupyterLaunch.sh``` and follow ApiServerInstance.help() and [examples](https://github.com/leondavi/NErlNet/tree/master/examples).\n\n## Python API and Jupyter-lab (For Api-Server): \nMinimum Python version: 3.8  \n  \nCommunication with Nerlnet is done through a simple python API that can be easily used through Jupyter notebook.       \nThe API allows the user to collect statistics insights of a distributed machine learning network:   \nNumber of messages, throughput, loss, predictions, models performance, etc.  \n\n### Instructions\n1. Open a jupyter lab environment using ```./NerlnetJupyterLaunch.sh -d \u003cexperiment_direcotry\u003e```  \n1.1    Use -h to see the help menu of NerlnetJupyterLaunch.sh script.  \n1.2    If --no-venv option is selected then required modules can be read from ```src_py/requirements.txt```.  \n3. Read the instructions of importing Api-Server within the generated readme.md file inside \u003cexperiment_directory\u003e folder. \n4. Follow the [Example Notebook](https://github.com/leondavi/NErlNet/blob/master/examples/example_run.ipynb)\n\n### Distributed ML on The Edge\nDistributed ML on the edge - A new evolution step of AI.  \n\nhttps://github.com/leondavi/NErlNet/assets/18975070/15a3957a-3fd6-4fb2-a365-7e1578468298  \n\n## Gratitudes\n\u003ch3 align=\"center\"\u003eMicrosoft Azure\u003c/h1\u003e\n\u003cp align=\"center\"\u003e \u003cimg src=\"https://github.com/leondavi/NErlNet/assets/18975070/d3255b30-ae3b-46fd-a87f-6c1ec7ae231b\" width=\"50\" title=\"Microsoft Azure Sponsorship\"\u003e\u003c/p\u003e  \n\u003cp align=\"center\"\u003e A grant of Azure credits as part of Microsoft’s Azure credits for open source projects program (2024).\u003c/p\u003e  \n\u003ch3 align=\"center\"\u003eAmazon AWS\u003c/h1\u003e\n\u003cp align=\"center\"\u003e \u003cimg src=\"https://github.com/leondavi/NErlNet/assets/18975070/5fe285fd-43c9-4de8-a619-5ebaace33b29\" width=\"50\" title=\"Amazon AWS Sponsorship\"\u003e\u003c/p\u003e  \n\n\u003cp align=\"center\"\u003e A grant of AWS credits as part of AWSOpen program for open source projects (2024).\u003c/p\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleondavi%2FNErlNet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleondavi%2FNErlNet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleondavi%2FNErlNet/lists"}