Skip to content

Commit

Permalink
Merge pull request #51 from aidecentralized/restructure
Browse files Browse the repository at this point in the history
config writeup
  • Loading branch information
ishaansingh22 authored Aug 17, 2024
2 parents 6762643 + 58706ad commit f530da1
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions docs/getting-started/config.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,25 @@
# Config file
The config file is the most important file when running the code. The current set up combines a system config with an algorithm config file. Always be sure of what config you are using. We have intentionally kept configuration files as a python file which is typically a big red flag in software engineering. But we did this because it enables plenty of quick automations and flexibility. Be very careful with the config file because it is easy to overlook some of the configurations such as device ids, number of clients etc.
# Configuration File Overview

## Importance of the Configuration File

The configuration file is the cornerstone of running our codebase, providing the necessary settings to ensure smooth execution. It combines a **system configuration** with an **algorithm configuration** to manage both infrastructure and algorithmic parameters. This separation is crucial for maintaining flexibility and clarity, allowing different aspects of the system to be configured independently.

### Why This Setup?

We intentionally chose to maintain the configuration as a Python file. The Python-based configuration allows for rapid automation and adaptation, enabling researchers to quickly iterate and customize configurations as needed. However, this flexibility comes with responsibility. It is essential to carefully manage the configuration, as it is easy to overlook critical settings such as device IDs or the number of clients. Always double-check your configuration file before running the code to avoid unintended behavior.

## Purpose of Configuration Separation

The configuration files are split into two main parts:

1. **System Configuration (`system_config`)**: Manages the infrastructure-related aspects, such as client configurations, GPU device allocation, and data splits. This ensures that researchers focused on algorithm development can work without needing to adjust system-level details.

2. **Algorithm Configuration (`algo_config`)**: Contains settings specific to the algorithm, such as hyperparameters, learning rates, and model architecture. This configuration is designed to be independent of the system configuration, allowing for modularity and easier experimentation.

These two configurations are combined at runtime in the `scheduler.py` file, which orchestrates the execution of the code based on the provided settings.

## Example Use Case

Consider a scenario where you need to allocate specific GPUs to different clients and define unique data splits for each. These details would be managed in the `system_config`, ensuring that they are isolated from the algorithm's logic. If a researcher wants to test a new optimization algorithm, they can do so by modifying the `algo_config` without worrying about the underlying system setup.

This separation simplifies collaboration and experimentation, allowing different team members to focus on their respective domains without interfering with each other's work.

0 comments on commit f530da1

Please sign in to comment.