Flower CLI reference#

flower-driver-api#

Start a Flower Driver API server. This server will be responsible for receiving TaskIns from the Driver script and sending them to the Fleet API. Once the client nodes are done, they will send the TaskRes back to this Driver API server (through the Fleet API) which will then send them back to the Driver script.

usage: flower-driver-api [-h] [--insecure]
                         [--certificates CA_CERT SERVER_CERT PRIVATE_KEY]
                         [--database DATABASE]
                         [--driver-api-address DRIVER_API_ADDRESS]

Named Arguments#

--insecure

Run the server without HTTPS, regardless of whether certificate paths are provided. By default, the server runs with HTTPS enabled. Use this flag only if you understand the risks.

Default: False

--certificates

Paths to the CA certificate, server certificate, and server private key, in that order. Note: The server can only be started without certificates by enabling the –insecure flag.

--database

A string representing the path to the database file that will be opened. Note that passing ‘:memory:’ will open a connection to a database that is in RAM, instead of on disk. If nothing is provided, Flower will just create a state in memory.

Default: “:flwr-in-memory-state:”

--driver-api-address

Driver API (gRPC) server address (IPv4, IPv6, or a domain name)

Default: “0.0.0.0:9091”

flower-fleet-api#

Start a Flower Fleet API server.This server will be responsible for sending TaskIns (received from the Driver API) to the client nodes and of receiving TaskRes sent back from those same client nodes once they are done. Then, this Fleet API server can send those TaskRes back to the Driver API.

usage: flower-fleet-api [-h] [--insecure]
                        [--certificates CA_CERT SERVER_CERT PRIVATE_KEY]
                        [--database DATABASE] [--grpc-rere | --rest | --vce]
                        [--grpc-rere-fleet-api-address GRPC_RERE_FLEET_API_ADDRESS]
                        [--rest-fleet-api-address REST_FLEET_API_ADDRESS]
                        [--ssl-certfile SSL_CERTFILE]
                        [--ssl-keyfile SSL_KEYFILE]
                        [--rest-fleet-api-workers REST_FLEET_API_WORKERS]
                        [--client-app CLIENT_APP]
                        [--num-supernodes NUM_SUPERNODES] [--backend BACKEND]
                        [--backend-config BACKEND_CONFIG] [--dir DIR]

Named Arguments#

--insecure

Run the server without HTTPS, regardless of whether certificate paths are provided. By default, the server runs with HTTPS enabled. Use this flag only if you understand the risks.

Default: False

--certificates

Paths to the CA certificate, server certificate, and server private key, in that order. Note: The server can only be started without certificates by enabling the –insecure flag.

--database

A string representing the path to the database file that will be opened. Note that passing ‘:memory:’ will open a connection to a database that is in RAM, instead of on disk. If nothing is provided, Flower will just create a state in memory.

Default: “:flwr-in-memory-state:”

--grpc-rere

Start a Fleet API server (gRPC-rere)

Default: “grpc-rere”

--rest

Start a Fleet API server (REST, experimental)

--vce

Start a Fleet API server (VirtualClientEngine)

--dir

Add specified directory to the PYTHONPATH and loadClientApp from there. Default: current working directory.

Default: “”

Fleet API (gRPC-rere) server options#

--grpc-rere-fleet-api-address

Fleet API (gRPC-rere) server address (IPv4, IPv6, or a domain name)

Default: “0.0.0.0:9092”

Fleet API (REST) server options#

--rest-fleet-api-address

Fleet API (REST) server address (IPv4, IPv6, or a domain name)

Default: “0.0.0.0:9093”

--ssl-certfile

Fleet API (REST) server SSL certificate file (as a path str), needed for using ‘https’.

--ssl-keyfile

Fleet API (REST) server SSL private key file (as a path str), needed for using ‘https’.

--rest-fleet-api-workers

Set the number of concurrent workers for the Fleet API REST server.

Default: 1

Fleet API (VCE) server options#

--client-app

For example: client:app or project.package.module:wrapper.app.

--num-supernodes

Number of simulated SuperNodes.

--backend

Simulation backend that executes the ClientApp.

Default: “ray”

--backend-config

A JSON formatted stream, e.g ‘{“<keyA>”:<value>, “<keyB>”:<value>}’ to configure a backend. Values supported in <value> are those included by flwr.common.typing.ConfigsRecordValues.

Default: “{“client_resources”: {“num_cpus”:1, “num_gpus”:0.0}, “tensorflow”: 0}”

flower-client-app#

Start a Flower client app

usage: flower-client-app [-h] [--insecure] [--rest]
                         [--root-certificates ROOT_CERT] [--server SERVER]
                         [--dir DIR]
                         client-app

Positional Arguments#

client-app

For example: client:app or project.package.module:wrapper.app

Named Arguments#

--insecure

Run the client without HTTPS. By default, the client runs with HTTPS enabled. Use this flag only if you understand the risks.

Default: False

--rest

Use REST as a transport layer for the client.

Default: False

--root-certificates

Specifies the path to the PEM-encoded root certificate file for establishing secure HTTPS connections.

--server

Server address

Default: “0.0.0.0:9092”

--dir

Add specified directory to the PYTHONPATH and load Flower app from there. Default: current working directory.

Default: “”

flower-server-app#

Start a Flower server app

usage: flower-server-app [-h] [--insecure] [--root-certificates ROOT_CERT]
                         [--server SERVER] [--dir DIR]
                         server-app

Positional Arguments#

server-app

For example: server:app or project.package.module:wrapper.app

Named Arguments#

--insecure

Run the server app without HTTPS. By default, the app runs with HTTPS enabled. Use this flag only if you understand the risks.

Default: False

--root-certificates

Specifies the path to the PEM-encoded root certificate file for establishing secure HTTPS connections.

--server

Server address

Default: “0.0.0.0:9091”

--dir

Add specified directory to the PYTHONPATH and load Flower app from there. Default: current working directory.

Default: “”