π» Using the CLIΒΆ
P2PFL provides a command-line interface (CLI) to simplify running experiments. You can launch the CLI using python -m p2pfl
. This interface provides a convenient way to explore and run different federated learning experiments without manually writing code for each node. You can easily switch to different communication protocols, aggregators, and ML frameworks.
β¨οΈ Main CommandsΒΆ
Command |
Description |
Availability |
---|---|---|
|
Run experiments on the p2pfl platform. |
β |
|
Launch a new node in the p2pfl network. |
π Coming Soon |
|
Authenticate with the p2pfl platform using your API token. |
π Coming Soon |
|
Interact with a remote node in the p2pfl network. |
π Coming Soon |
π§ͺ Example: experiment
CommandΒΆ
This command allows you to interact with pre-built examples. Hereβs how you can use it:
List available examples:
python -m p2pfl experiment list
. This will display a table of available examples with their descriptions.Run an example:
python -m p2pfl experiment run <example_name> [options]
.This will run the specified example.
For instance, to run the mnist
example for 2 rounds of training with 1 epoch each:
python -m p2pfl experiment run mnist --rounds 2 --epochs 1
This command will start the mnist
experiment with the specified options and the default components. To see the available options for the mnist
experiment, you can run:
python -m p2pfl experiment help mnist