Thank you for your interest in contributing to FedRAG! This document provides guidelines and instructions for contributing.
We welcome contributions from developers of all skill levels. Whether you're fixing a typo or implementing a complex feature, your help is valuable to the FedRAG project.
By participating in this project, you agree to abide by our Code of Conduct. Please read it before contributing.
In order to get going, we need to make sure you have the right development environment setup. Below, we provide the 4 steps to get you on you way!
- Fork and clone the repository
# Clone your fork
git clone https://github.com/YOUR_USERNAME/fed-rag.git
cd fed-rag- Setup the project's virtual environment with
uv
You must have the uv Python package manager installed on your machine. For installation
instructions, you can visit uv's official documentation
or its Github repo.
uv sync --all-extras --group dev --group docs- Activate the project's virtual environment
The previous command will automatically create a virtual environment stored in
.venv folder. To activate it, use the below command:
source .venv/bin/activate- Install pre-commit hooks
pre-commit installEveryone can contribute to FedRAG! Whether you're a seasoned ML engineer, new to federated learning and RAG/LLMs, or somewhere in between—your input is valuable. Here are several ways to get involved:
Fixing bugs is a great way to get started. Check our
GitHub Issues page and look
for issues labeled good first issue to begin with.
Help make our documentation more comprehensive and accessible. This includes:
- API documentation
- Usage guides
- Glossary
- Tutorials
- Architecture explanations
Extend FedRAG's capabilities by contributing new features that enhance both centralized and federated fine-tuning of RAG systems. Share your ideas by opening an issue first to discuss implementation details.
If you've used FedRAG in interesting ways, consider contributing:
- Example notebooks
- Case studies
- Benchmarks
- Integration examples
Once you've decided on what contribution you'd like to make, you can follow the listed steps below to create a development branch and submit your pull request.
Note
Make sure to have followed the instructions listed in the Getting Started section in order to get your development environment set up properly.
- Create a new branch
git checkout -b feature/your-feature-name-
Make your changes following our Development Guidelines.
-
Commit your changes with a clear message
git commit -m "Add feature: description of changes"- Push to your fork
git push origin feature/your-feature-name- Open a pull request against the
mainbranch
If you are making a contribution to the docs, then in addition to the previously listed steps, during development you may find it helpful to watch the docs as you make changes locally.
# in the root of the project
mkdocs serveThis will launch a development server on http://127.0.0.1:8000/. You can enter
this address in your web browser of choice to watch your changes live as they happen.
Below, we loosely describe the process of having your code reviewed and eventually
merged into main.
- At least one maintainer will review your PR
- Address any requested changes or feedback
- Once approved, a maintainer will merge your PR
- For significant changes, multiple reviewers may be required
We follow established Python conventions and use tools to maintain code quality:
- Follow PEP 8 for Python code style
- Use Black for automatic code formatting
- Apply isort for organizing imports
- Run Ruff for linting
The pre-commit hooks you installed will automatically check and fix many style issues.
Good documentation is crucial for our project:
- Document all public functions, classes, and methods using Google docstring format
- Keep documentation updated when changing code
- Include examples where appropriate to show usage
We prioritize testing to maintain code quality:
- Write tests for all new features and bug fixes
- Maintain or improve test coverage
- We use pytest for our test framework
- Run all tests before submitting your PR:
# while in root of project and with project's virtual env active
make testWe have several channels for project communication:
- Join our Discord community
- For bug reports and feature requests, use GitHub Issues
- For longer discussions, use GitHub Discussions
By contributing to FedRAG, you agree that your contributions will be licensed under the project's LICENSE file.
We're excited to see what you'll bring to the FedRAG community! Remember that contributions of all sizes matter - from fixing a typo to implementing complex federated learning algorithms. Your involvement helps push the boundaries of what's possible with federated fine-tuning of RAG.
We look forward to your pull requests!