Skip to main content

Pre-packaged federated learning framework using Flower and PyTorch-Lightning.

Project description

Alt text

LightingFlower

Pre-packaged federated learning framework using Flower and PyTorch-Lightning.

Installation

To install this library, simply run the following command:

pip install lightningflower

Installing the lightningflower framework should automatically install suitable versions of [Flower] and [PyTorch-Lightning].

##Features

Integrated Argument Parser

LightningFlower provides integrated argument parsing for data, server and client handling:

# initialize the argument parser
parser = ArgumentParser()

# Data-specific arguments like batch size
parser = LightningFlowerData.add_data_specific_args(parser)

# Trainer-specific arguments like number of epochs
parser = pl.Trainer.add_argparse_args(parser)

# Client-specific arguments like host address
parser = LightningFlowerClient.add_client_specific_args(parser)

# Parse arguments
args = parser.parse_args()

LightningFlowerBaseStrategy

A basic strategy to enable saving and loading of model weights as well as resuming the training procedure.

Full Pytorch-Lightning Trainer integration

LightningFlower supports full use of the Pytorch-Lighting training routines on federated Flower clients:

# Configure the client trainer
parser = pl.Trainer.add_argparse_args(parser)
args = parser.parse_args()

# Define a Pytorch-Lighting compatible model to train
model = pl.RandomModel()

# Create a client, pass Trainer configuration to and model to client
LightingFlowerClient(model=model, trainer_args=args, ...)

Federated transfer learning / backbone support

LightningFlower enables transfer learning by only transmitting trainable model parameters from server to clients, saving bandwidth and computation time.

ToDo

This is a work in progress.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lightningflower-0.1.7.tar.gz (10.3 kB view details)

Uploaded Source

File details

Details for the file lightningflower-0.1.7.tar.gz.

File metadata

  • Download URL: lightningflower-0.1.7.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for lightningflower-0.1.7.tar.gz
Algorithm Hash digest
SHA256 f9174268b61a5a99c466bd3fdd3cfb3509f1b617351afe9d222b2e66a7e6de15
MD5 c646b70eb7df5bb3a53ca4ac9ae1607b
BLAKE2b-256 3e6c3eb67197be170f9f33ee0d1f38af211ce87d0c21acb39470b7f7bc1b981e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page