Flower CLI reference#
flower-superlink#
Start a Flower SuperLink
usage: flower-superlink [-h] [--insecure]
[--certificates CA_CERT SERVER_CERT PRIVATE_KEY]
[--database DATABASE]
[--require-client-authentication CLIENT_KEYS SERVER_PRIVATE_KEY SERVER_PUBLIC_KEY]
[--driver-api-address DRIVER_API_ADDRESS]
[--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] [--app-dir APP_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:”
- --require-client-authentication
Provide three file paths: (1) a .csv file containing a list of known client public keys for authentication, (2) the server’s private key file, and (3) the server’s public key file.
- --driver-api-address
Driver API (gRPC) server address (IPv4, IPv6, or a domain name)
Default: “0.0.0.0:9091”
- --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)
- --app-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-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]
[--require-client-authentication CLIENT_KEYS SERVER_PRIVATE_KEY SERVER_PUBLIC_KEY]
[--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:”
- --require-client-authentication
Provide three file paths: (1) a .csv file containing a list of known client public keys for authentication, (2) the server’s private key file, and (3) the server’s public key file.
- --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]
[--require-client-authentication CLIENT_KEYS SERVER_PRIVATE_KEY SERVER_PUBLIC_KEY]
[--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] [--app-dir APP_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:”
- --require-client-authentication
Provide three file paths: (1) a .csv file containing a list of known client public keys for authentication, (2) the server’s private key file, and (3) the server’s public key file.
- --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)
- --app-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]
[--max-retries MAX_RETRIES]
[--max-wait-time MAX_WAIT_TIME] [--dir DIR]
[--authentication-keys CLIENT_PRIVATE_KEY CLIENT_PUBLIC_KEY]
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”
- --max-retries
The maximum number of times the client will try to connect to theserver before giving up in case of a connection error. By default,it is set to None, meaning there is no limit to the number of tries.
- --max-wait-time
The maximum duration before the client stops trying toconnect to the server in case of connection error. By default, itis set to None, meaning there is no limit to the total time.
- --dir
Add specified directory to the PYTHONPATH and load Flower app from there. Default: current working directory.
Default: “”
- --authentication-keys
Provide two file paths: (1) the client’s private key file, and (2) the client’s public key file.
flower-server-app#
Start a Flower server app
usage: flower-server-app [-h] [--insecure] [--verbose]
[--root-certificates ROOT_CERT] [--server SERVER]
[--dir DIR] [--fab-id FAB_ID]
[--fab-version FAB_VERSION]
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
- --verbose
Set the logging to DEBUG.
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: “”
- --fab-id
The identifier of the FAB used in the run.
- --fab-version
The version of the FAB used in the run.
flower-simulation#
Start a Flower simulation
usage: flower-simulation [-h] --server-app SERVER_APP --client-app CLIENT_APP
--num-supernodes NUM_SUPERNODES
[--driver-api-address DRIVER_API_ADDRESS]
[--backend BACKEND] [--backend-config BACKEND_CONFIG]
[--enable-tf-gpu-growth] [--verbose]
[--app-dir APP_DIR]
Named Arguments#
- --server-app
For example: server:app or project.package.module:wrapper.app
- --client-app
For example: client:app or project.package.module:wrapper.app
- --num-supernodes
Number of simulated SuperNodes.
- --driver-api-address
For example: server:app or project.package.module:wrapper.app
Default: “0.0.0.0:9091”
- --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”:2, “num_gpus”:0.0}, “tensorflow”: 0}”
- --enable-tf-gpu-growth
Enables GPU growth on the main thread. This is desirable if you make use of a TensorFlow model on your ServerApp while having your ClientApp running on the same GPU. Without enabling this, you might encounter an out-of-memory error because TensorFlow by default allocates all GPU memory.Read more about how tf.config.experimental.set_memory_growth() works in the TensorFlow documentation: https://www.tensorflow.org/api/stable.
Default: False
- --verbose
When unset, only INFO, WARNING and ERROR log messages will be shown. If set, DEBUG-level logs will be displayed.
Default: False
- --app-dir
Add specified directory to the PYTHONPATH and loadClientApp and ServerApp from there. Default: current working directory.
Default: “”