{"id":19811158,"url":"https://github.com/accenture/docknet","last_synced_at":"2025-05-01T08:32:36.930Z","repository":{"id":43320352,"uuid":"274980011","full_name":"Accenture/Docknet","owner":"Accenture","description":"A pure Numpy implementation of neural networks for educational purposes","archived":false,"fork":false,"pushed_at":"2023-05-02T00:26:30.000Z","size":2086,"stargazers_count":2,"open_issues_count":1,"forks_count":3,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-06T11:51:46.767Z","etag":null,"topics":["deep-learning","docker","jupyter","neural-networks","python","rest-api","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Accenture.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.txt","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-25T17:47:57.000Z","updated_at":"2022-03-08T11:38:18.000Z","dependencies_parsed_at":"2024-11-12T09:38:16.709Z","dependency_job_id":null,"html_url":"https://github.com/Accenture/Docknet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Accenture%2FDocknet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Accenture%2FDocknet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Accenture%2FDocknet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Accenture%2FDocknet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Accenture","download_url":"https://codeload.github.com/Accenture/Docknet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251847828,"owners_count":21653582,"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":["deep-learning","docker","jupyter","neural-networks","python","rest-api","unit-testing"],"created_at":"2024-11-12T09:25:00.874Z","updated_at":"2025-05-01T08:32:36.602Z","avatar_url":"https://github.com/Accenture.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"Docknet\n=======\n\nThe Docknet project comprises:\n\n* a Python package with a pure NumPy implementation of neural networks\n* unit tests to validate the code\n* a set of Jupyter notebooks making use of the Python package\n* a Docker container and REST API to provide an online classification service based on precomputed models\n\nThe neural network implementation is strongly based on courses 1 and 2 of Coursera's Deep Learning Specialization: https://www.coursera.org/specializations/deep-learning.\n\nThis project has been developed for educational purposes only, namely to:\n\n* understand the math and algorithms required to implement and train neural networks\n* illustrate how one could unit test this code\n* illustrate how to build a Python package\n* illustrate how to consume the Python package with Jupyter notebooks, allowing to mix structured code (the Python package) with exploration code (the notebooks)\n* illustrate how to dockerize a Python application and provide a REST API to use it as and online service\n\nRequirements\n------------\n\nTo run this project Python 3.8 or higher is required, as well as pipenv in order to create a Python virtual environment where to install all the python packages as well as JupyterLab. In Ubuntu, run the command:\n\n`sudo apt-get install python3.8 python3.8-dev python3-venv`\n\nIn macOS one can easily install the necessary packages with Homebrew. Homebrew can be installed with the following command:\n\n`/usr/bin/ruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\"`\n\nThen one can install the necessary packages as follows:\n\n`brew install python pipenv`\n\nDocker is needed in order to run Docknet as a service inside a Docker container. More information on how to install Docker can be found here:\n\nhttps://docs.docker.com/get-docker/\n\nNote, the service can also be run without a Docker container, in which case Docker is not needed.\n\nInstallation\n------------\n\nRun the bash script at:\n\n`delivery/scripts/build.sh`\n\nThis script will create a Python virtual environment at:\n\n`$HOME/docknet_venv`\n\nand install there the Docknet Python package along with all the necessary Python dependencies and JupyterLab.\n\nRunning the notebooks\n---------------------\n\nActivate the Docknet virtual environment:\n\n`source $HOME/docknet_venv/bin/activate`\n\nGo to the main project folder and open JupyterLab with the following command:\n\n`jupyter lab`\n\nA web browser should open with the JupyterLab interface. Navigate to the folder:\n\n`exploration`\n\n4 example notebooks are located there. Each notebook contains a binary classification problem solved with a neural network. The Docknet library contains a set of dataset generators, which produce a random sample for binary classification. A Docknet is created using an appropriate number of layers, neurons and other hyperparameters in order to properly classify the generated data.\n\nRunning the web service\n-----------------------\n\nThere are 2 options for running the web service, running the service directly in your machine or inside a Docker container. For running the service directly in your machine, follow the previous installation steps, then activate the Docknet virtual environment:\n\n`source $HOME/docknet_venv/bin/activate`\n\nthen run the command:\n\n`docknet_start`\n\nFor running the service inside a Docker container, first go to the project main folder and build the container with the command:\n\n`docker build -t docknet .`\n\nThen run the Docker container with the command:\n\n`docker run -p 8080:8080 -it docknet`\n\nIndependently on whether the service is run inside a Docker container or not, 4 classification services will then be available from the following URLs, each one corresponding to one of the classification problems illustrated in the 4 notebooks:\n\nhttp://localhost:8080/chessboard_prediction?x0=2\u0026x1=2  \nhttp://localhost:8080/cluster_prediction?x0=2\u0026x1=2  \nhttp://localhost:8080/island_prediction?x0=2\u0026x1=2  \nhttp://localhost:8080/swirl_prediction?x0=2\u0026x1=2\n\nParameters x0 and x1 correspond to the data point to classify where the values (2, 2) have been given as an example. The services return a JSON such as:\n\n{\"message\": 1, \"success\": true}\n\nwhere \"message\" is either the predicted label (if \"success\" is true) or the error message (if \"success\" is false, for instance if there are missing parameters in the URL).\n\nLicense\n-------\n\nDocknet is distributed under the Apache 2.0 license. A copy of the license can be found in the file `LICENSE.txt`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faccenture%2Fdocknet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faccenture%2Fdocknet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faccenture%2Fdocknet/lists"}