Giter Site home page Giter Site logo

nevzatseferoglu / fl-service Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 3.24 MB

This API caters to data scientists, simplifying remote host communication with service endpoints. It allows users to efficiently manage flower federated learning clusters.

Home Page: https://fl-service-api-doc.netlify.app/

Python 96.62% Makefile 2.89% Shell 0.49%
docker fastapi federated-learning flower-framework python pytorch

fl-service's Introduction

fl-service

Netlify

Presentation: https://www.youtube.com/watch?v=1xq5LQ0DfYg

Report: https://github.com/nevzatseferoglu/fl-service/blob/main/doc/Report.pdf

API which tailored to the needs of data scientists. The interface streamlines communication with remote hosts through the use of service endpoints, allowing for seamless API-based interactions. These endpoints empower users to initiate, terminate, and manage flower federated learning clusters, ensuring the preservation of a unified strategy across the system's architecture.

See: Command line client from here.

v0.1.0

Docker installation, image generation and deployment

Docker installation with callback execution

Client image generation and deployment

Generate SSH key-pair for the server

curl --location --request POST 'http://localhost:8000/ssh/generate_ssh_key_pair'

Register an host machine to the service

curl --location 'http://localhost:8000/ssh/copy-ssh-key-to-remote-host' \ --header 'Content-Type: application/json' \ --data-raw '{ "contact_info": "[email protected]", "ip_address": "192.168.1.105", "ssh_username": "username", "ssh_password": "password", "flower_type": "client", "fl_identifier": "test_model" }'

curl -X POST "http://localhost:8000/ssh/copy-ssh-key-to-remote-host" --header 'Content-Type: application/json' --data-raw '{ "contact_info": "[email protected]", "ip_address": "192.168.1.105", "ssh_username": "suav", "ssh_password": "abc123", "flower_type": "client", "fl_identifier": "test_model" }'

Upload source file to turn into docker image

  • Request template;

curl -X POST "http://localhost:8000/docker/upload-source-files/ip_address/pytorch/" \ -H "Content-Type: multipart/form-data" \ -F file=@absolute_path_to_souce_zip_file

  • Example;

curl -X POST "http://localhost:8000/docker/upload-source-files/192.168.1.105/pytorch/amd64/" -H "Content-Type: multipart/form-data" -F file=@/Users/nevzatseferoglu/Desktop/flower/example-project/project-source.zip

Starting deployment

  • Request template;

curl -X POST "http://localhost:8000/docker/deploy/ip_address/"

  • Example;

curl -X POST "http://localhost:8000/docker/deploy/192.168.1.105/"

Makefile commands

  • make run Run the server on port :8000. It can be changed through makefile.

  • make kill Kill the running server process.

  • make lint Apply code formatting, importing sorting and linting.

Research

  • Determine whether file locking is required.

Success Criteria

  • Manuel installation versus, saas installation time improvement will be %70. (satisfied)
  • At least 4 client + 1 server. (satisfied)
  • Face detection algorithm will run at 80% accuracy and new data will improve to 85% percent.

ToDo

  • Change the database in a way that it can manage more than one fl algorithm. That means there will be more than one (server/clients) configuration.
  • Update architecture diagram
  • The docstring for a function or method should summarize its behavior and document its arguments, return value(s), side effects, exceptions raised, and restrictions on when it can be called (all if applicable).
  • Add diagrams (sequence)
  • Set request path, query parameters validation.
  • Introduce usa-case scenario and set up instructions of the host machine.
  • Incrase observability.
  • Add missing informations to the doc.
  • Mention about contraints such as recorded host can participate a single federated learning.
  • Target host machine might require key file to connect through paramiko.

fl-service's People

Contributors

nevzatseferoglu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.