-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ac17821
commit 208b69a
Showing
5 changed files
with
49 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,6 @@ venv/* | |
*.jpg | ||
*.crt | ||
*.key | ||
.eggs | ||
.eggs | ||
eggs | ||
*.pyi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
This readme provides instructions for setting up and running the Horovod example using OpenFL. | ||
|
||
## Prerequisites | ||
Before running the Horovod example, ensure that the following prerequisites are met: | ||
|
||
1. Python environment should be set up on all nodes. | ||
2. The environment should be sourced when logging into SSH. | ||
|
||
## Setting up Horovod Dependencies | ||
To set up the Horovod dependencies, follow these steps: | ||
|
||
1. Run the `setup_env.sh` script located in `openfl-tutorials/experimental/setup_env.sh` within your virtual environment (venv). | ||
2. Run the `setup_horovod_fed.sh` script to create aggregator and collaborator workspaces. | ||
3. Ensure that the collaborator workspace is present in each node with the same file structure. | ||
4. Make sure the dataset is available in each node. | ||
|
||
## Setting up Passwordless SSH Login | ||
Horovod requires passwordless SSH login. Follow the instructions provided at [this link](http://www.linuxproblem.org/art_9.html) to set it up. | ||
|
||
## Environmental Variables | ||
Set the following environmental variables for Horovod: | ||
|
||
- `OPENFL_HOROVOD_DEMO_NP`: Set this variable to the number of processes to run (e.g., "4"). | ||
- `OPENFL_HOROVOD_DEMO_NICS`: Set this variable to the common network interface name to use with all nodes (e.g., "en01,lo"). | ||
- `OPENFL_HOROVOD_DEMO_LOCALHOSTIP`: Set this variable to the IP address of the local node (e.g., "ip1"). | ||
- `OPENFL_HOROVOD_DEMO_HOSTS`: Set this variable to the IP address of each node and the number of slots (e.g., "ip1:2,ip2:2"). | ||
|
||
## Customizing Data and Models | ||
To use your own data and models, follow these steps: | ||
|
||
1. Copy the `openfl/openfl-workspace/torch_llm_horovod` directory to `openfl/openfl-workspace/name_of_your_template`. | ||
2. In the `src/InHorovodrun` file, make the following changes: | ||
- Replace `GlueMrpcDataLoader` with your own dataloader. | ||
- Replace `LLMTrainer` with your own training/validation scripts. | ||
|
||
## Running the Experiment | ||
To run the experiment, follow the instructions provided in the [OpenFL documentation](https://openfl.readthedocs.io/en/latest/running_the_federation.html#bare-metal-approach) using either the `torch_llm_horovod` template or your own template. | ||
|
||
That's it! You're now ready to use the Horovod example with your own data and models. Enjoy! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters