{"id":27749,"library":"flwr-nightly","title":"Flower Nightly Build","description":"Nightly pre-release of the Flower federated learning framework (Flower: A Friendly Federated AI Framework). Current version is 1.30.0.dev20260508, requires Python >=3.10,<4.0. Published daily from the main development branch. Not stable; use for testing and previewing upcoming features.","status":"active","version":"1.30.0.dev20260508","language":"python","source_language":"en","source_url":"https://github.com/flwrlabs/flower","tags":["federated-learning","nightly","pre-release","flwr","flower"],"install":[{"cmd":"pip install flwr-nightly","lang":"bash","label":"Install nightly build"}],"dependencies":[{"reason":"gRPC communication between server and clients","package":"grpcio","optional":false},{"reason":"Protocol buffers for message serialization","package":"protobuf","optional":false}],"imports":[{"note":"The package is imported as flwr, not flower.","wrong":"import flower","symbol":"flwr","correct":"import flwr"},{"note":"Correct as shown; older versions used flwr.client.NumPyClient","wrong":"from flwr.client import NumPyClient","symbol":"NumPyClient","correct":"from flwr.client import NumPyClient"},{"note":"Strategy is available directly under flwr.server (not .strategy)","wrong":"from flwr.server.strategy import Strategy","symbol":"Strategy","correct":"from flwr.server import Strategy"}],"quickstart":{"code":"import flwr as fl\nimport tensorflow as tf\n\n# Define a simple client\nclass CifarClient(fl.client.NumPyClient):\n    def __init__(self):\n        self.model = tf.keras.applications.ResNet50(weights=None, input_shape=(32,32,3), classes=10)\n        self.model.compile('adam', 'sparse_categorical_crossentropy', metrics=['accuracy'])\n        (x_train, y_train), (x_test, y_test) = tf.keras.datasets.cifar10.load_data()\n        self.x_train, self.y_train = x_train.astype('float32')/255, y_train\n        self.x_test, self.y_test = x_test.astype('float32')/255, y_test\n\n    def get_parameters(self, config):\n        return self.model.get_weights()\n\n    def fit(self, parameters, config):\n        self.model.set_weights(parameters)\n        self.model.fit(self.x_train, self.y_train, epochs=1, verbose=0)\n        return self.model.get_weights(), len(self.x_train), {}\n\n    def evaluate(self, parameters, config):\n        self.model.set_weights(parameters)\n        loss, acc = self.model.evaluate(self.x_test, self.y_test, verbose=0)\n        return loss, len(self.x_test), {'accuracy': acc}\n\n# Start client\nfl.client.start_numpy_client(server_address='127.0.0.1:8080', client=CifarClient())","lang":"python","description":"Quickstart example: a Flower client using NumPyClient with TensorFlow."},"warnings":[{"fix":"Use stable release flwr instead for production. Pin a specific nightly if needed, but expect instability.","message":"Nightly builds may introduce breaking changes without notice. Do not use in production or as a pinned dependency for reproducible experiments.","severity":"breaking","affected_versions":"all nightly versions"},{"fix":"Use the new Message API strategies from flwr.server.strategy (e.g., FedAvgMessage). Refer to migration guide.","message":"The legacy strategy API (e.g., flwr.server.strategy.FedAvg) is being replaced by the Message API. In nightly builds, some strategies may be removed or renamed.","severity":"deprecated","affected_versions":">=1.30.0.dev"},{"fix":"Use a virtual environment to isolate nightly builds. Do not install both flwr and flwr-nightly in the same environment.","message":"Installing flwr-nightly may conflict with a stable flwr installation. pip may uninstall flwr in favor of flwr-nightly.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Run `pip install flwr-nightly` to install the nightly build.","cause":"Installed flwr-nightly but tried to import flwr. The package provides the flwr module, but pip may have named it differently? Actually, flwr-nightly provides the flwr module, so this error occurs if flwr is not installed and flwr-nightly is also missing.","error":"ModuleNotFoundError: No module named 'flwr'"},{"fix":"Use explicit import: `from flwr import client` or `import flwr.client`.","cause":"In very old versions or if using a broken nightly, the client submodule may not be imported automatically.","error":"AttributeError: module 'flwr' has no attribute 'client'"},{"fix":"Check the nightly documentation for the correct class name. Use `from flwr.client import Client` and adjust accordingly.","cause":"NumPyClient was renamed to something else in nightly builds (e.g., Client). Check the current API.","error":"ImportError: cannot import name 'NumPyClient' from 'flwr.client'","affected_versions":">=1.30.0.dev"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}