Skip to content

Latest commit

 

History

History
204 lines (136 loc) · 6.06 KB

File metadata and controls

204 lines (136 loc) · 6.06 KB

🌟 Contributing to FedRAG

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.

Code of Conduct

By participating in this project, you agree to abide by our Code of Conduct. Please read it before contributing.

Getting Started

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!

  1. Fork and clone the repository
# Clone your fork
git clone https://github.com/YOUR_USERNAME/fed-rag.git
cd fed-rag
  1. 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
  1. 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
  1. Install pre-commit hooks
pre-commit install

What Contributions Can You Make?

Everyone 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:

1. 🐛 Fix Bugs & Issues

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.

2. 📝 Improve Documentation

Help make our documentation more comprehensive and accessible. This includes:

  • API documentation
  • Usage guides
  • Glossary
  • Tutorials
  • Architecture explanations

3. ✨ Add New Features

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.

4. 📊 Share Examples

If you've used FedRAG in interesting ways, consider contributing:

  • Example notebooks
  • Case studies
  • Benchmarks
  • Integration examples

Making Contributions

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.

Developing your Contribution and Creating a Pull Request

  1. Create a new branch
git checkout -b feature/your-feature-name
  1. Make your changes following our Development Guidelines.

  2. Commit your changes with a clear message

git commit -m "Add feature: description of changes"
  1. Push to your fork
git push origin feature/your-feature-name
  1. Open a pull request against the main branch

When Contributing to Docs

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 serve

This 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.

Code Review Process

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

Development Guidelines

Coding Style

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.

Documentation

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

Testing

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 test

Communication

We have several channels for project communication:

License

By contributing to FedRAG, you agree that your contributions will be licensed under the project's LICENSE file.

✨ Final Words

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!