Contributing to FedLab#

Reporting bugs#

We use GitHub issues to track all bugs and feature requests. Feel free to open an issue if you have found a bug or wish to see a feature implemented.

In case you experience issues using this package, do not hesitate to submit a ticket to the Bug Tracker. You are also welcome to post feature requests or pull requests.

Contributing Code#

You’re welcome to contribute to this project through Pull Request. By contributing, you agree that your contributions will be licensed under Apache License, Version 2.0

We encourage you to contribute to the improvement of FedLab or the FedLab implementation of existing FL methods. The preferred workflow for contributing to FedLab is to fork the main repository on GitHub, clone, and develop on a branch. Steps as follow:

  1. Fork the project repository by clicking on the ‘Fork’. For contributing new features, please fork FedLab core repo or new implementations for FedLab benchmarks repo.

  2. Clone your fork of repo from your GitHub to your local:

    $ git clone git@github.com:YourLogin/FedLab.git
    $ cd FedLab
    
  3. Create a new branch to save your changes:

    $ git checkout -b my-feature
    
  4. Develop the feature on your branch.

    $ git add modified_files
    $ git commit
    

Pull Request Checklist#

  • Please follow the file structure below for new features or create new file if there are something new.

    fedlab
        ├── core
        │   ├── communicator            # communication module
        │   ├── client                  # client related implementations
        │   └── server                  # server related implementations
        │       └── hierarchical        # hierarchical communication pattern modules
        └── utils                       # functional modules
            └── dataset                 # functional modules about dataset
    
  • The code should provide test cases using unittest.TestCase. And ensure all local tests passed:

    $ python test_bench.py
    
  • All public methods should have informative docstrings with sample usage presented as doctests when appropriate. Docstring and code should follow Google Python Style Guide: 中文版 | English.