Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

flower-client

Package Overview
Dependencies
Maintainers
8
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flower-client

Node client for Flower Federated Learning (flower.dev)

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
8
Created
Source

Flower NodeJs Client

Package that allows you to implement a Flower client in NodeJs in order to create federated learning with tensorflow.js.

Prerequisite

Install :

  • python >= 3.6
  • flower library : pip install flwr
  • nodejs
  • npm

How to use

Same usage as the Python version.
Create a client that override the client class and fill the 4 methods, like "example/tfjs_Client.js".

const {Client} = require('flower-client');

class Tfjs_Client extends Client{
    ...
}

Modify if necessary the "server.py" and run it.
Finally, run the clients by using start_tfjs_client.

const {start_tfjs_client} = require('flower-client');

const tfjs_client = new Tfjs_Client();
await start_tfjs_client('<ip>:<port>', tfjs_Client,);

Run the example

  • Clone repository
  • Get into the folder : cd <path to the folder>
  • Installation: npm i
  • Get into the folder example: cd example
  • Run the server : python server.py
  • Run client#1 : node index.js
  • Run client#2 : node index.js

Keywords

FAQs

Package last updated on 11 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc