常见问题¶
本页收集了有关 "Flower 联邦学习 "常见问题的答案。
如何在 Raspberry Pi 上运行联邦学习?
Find the blog post about federated learning on embedded device here and the corresponding GitHub code example.
Flower 是否支持安卓设备上的联邦学习?
是的,确实如此。请查看我们的 "博客文章 <https://flower.ai/blog/2021-12-15-federated-learning-on-android-devices-with-flower>`_" 或查看代码示例:
Android Java 示例 <https://flower.ai/docs/examples/android.html>`_
我可以将联邦学习与区块链结合起来吗?
当然可以。有关在区块链环境中使用 Flower 的可用示例列表,请点击此处:
- FLock: A Decentralised AI Training Platform.
Contribute to on-chain training the model and earn rewards.
Local blockchain with federated learning simulation.
I see unexpected terminal output (e.g.: � □[32m□[1m) on Windows. How do I fix this?
If you see output (ANSI escape sequences or broken emojis) like this:
� □[32m□[1m□[0m□[96m□[1m�
this is usually a terminal host issue. Make sure you have installed the latest Windows Terminal application (Microsoft's terminal app), and then run Flower commands there.
To quickly check whether your current PowerShell session is running in Windows Terminal:
echo $env:WT_SESSION
If this prints a value (for example, b4c5f2c8-...), you are in Windows Terminal.
If it prints nothing, you are likely running in a non-Windows-Terminal host (for example, conhost), which can show raw ANSI escape codes or incorrect emoji rendering.
I got SQL database errors (like Exception calling application: database is locked) when running local simulations. What should I do?
Local simulations run through a managed local SuperLink. By default, that local
SuperLink stores its state in a SQLite database under $FLWR_HOME. SQLite is reliable
on a local file system, but it can perform poorly on networked filesystems such
as NFS-mounted home directories or HPC cluster storage. In those environments, you
might see errors such as database is locked or other SQLite-related failures.
To avoid these issues, stop the background local SuperLink and switch the local connection to the in-memory mode in your Flower configuration:
[superlink.local]
address = ":local-in-memory:"
After that, start your local simulation again with flwr run. Flower will launch
the managed local SuperLink with an in-memory database instead of an on-disk SQLite
database, which avoids filesystem locking issues. See
Flower Configuration for details.
The tradeoff is that this mode is not persistent. When the managed local SuperLink
stops, it loses its state, including run history and stored logs for previous runs.
If you need persistence, prefer keeping $FLWR_HOME on a local disk instead of a
network drive.