Thank you for your interest in contributing to swarm-models! Your contributions are vital to the success of this project, and we appreciate your efforts to make this library better for everyone.
This document provides guidelines and instructions to help you contribute effectively. Please take a moment to read through it before you start contributing.
- Project Overview
- Getting Started
- How to Contribute
- Coding Standards
- Areas Needing Contributions
- Community and Support
- License
swarm-models is a library focused on implementing novel swarm intelligence model architectures using Models. The goal is to explore and develop new architectures that can advance deep learning beyond the current limitations of data and compute scaling.
We need your help to:
- Write Tests: Ensure the reliability and correctness of the codebase.
- Improve Documentation: Maintain clear and comprehensive documentation.
- Add New Models: Add new model providers.
Your contributions will help us push the boundaries of AI and make this library a valuable resource for the community.
You can install swarm-models using pip
:
pip3 install swarm-models
Alternatively, you can clone the repository:
git clone https://github.com/kyegomez/swarm-models
swarms_Models/
: Contains all the source code for the library.examples/
: Includes example scripts and notebooks demonstrating how to use the library.tests/
: (To be created) Will contain unit tests for the library.docs/
: (To be maintained) Contains documentation files.
If you find any bugs, inconsistencies, or have suggestions for enhancements, please open an issue on GitHub:
- Search Existing Issues: Before opening a new issue, check if it has already been reported.
- Open a New Issue: If it hasn't been reported, create a new issue and provide detailed information.
- Title: A concise summary of the issue.
- Description: Detailed description, steps to reproduce, expected behavior, and any relevant logs or screenshots.
- Label Appropriately: Use labels to categorize the issue (e.g., bug, enhancement, documentation).
We welcome pull requests (PRs) for bug fixes, improvements, and new features. Please follow these guidelines:
-
Fork the Repository: Create a personal fork of the repository on GitHub.
-
Clone Your Fork: Clone your forked repository to your local machine.
git clone https://github.com/kyegomez/swarm-models.git
-
Create a New Branch: Use a descriptive branch name.
git checkout -b feature/your-feature-name
-
Make Your Changes: Implement your code, ensuring it adheres to the coding standards.
-
Add Tests: Write tests to cover your changes.
-
Commit Your Changes: Write clear and concise commit messages.
git commit -am "Add feature X"
-
Push to Your Fork:
git push origin feature/your-feature-name
-
Create a Pull Request:
- Go to the original repository on GitHub.
- Click on "New Pull Request".
- Select your branch and create the PR.
- Provide a clear description of your changes and reference any related issues.
-
Respond to Feedback: Be prepared to make changes based on code reviews.
Note: It's recommended to create small and focused PRs for easier review and faster integration.
To maintain code quality and consistency, please adhere to the following standards.
-
Mandatory: All functions and methods must have type annotations.
-
Example:
def add_numbers(a: int, b: int) -> int: return a + b
-
Benefits:
- Improves code readability.
- Helps with static type checking tools.
-
Docstrings: Every public class, function, and method must have a docstring following the Google Python Style Guide or NumPy Docstring Standard.
-
Content:
- Description: Briefly describe what the function or class does.
- Args: List and describe each parameter.
- Returns: Describe the return value(s).
- Raises: List any exceptions that are raised.
-
Example:
def calculate_mean(values: List[float]) -> float: """ Calculates the mean of a list of numbers. Args: values (List[float]): A list of numerical values. Returns: float: The mean of the input values. Raises: ValueError: If the input list is empty. """ if not values: raise ValueError("The input list is empty.") return sum(values) / len(values)
-
Documentation: Update or create documentation pages if your changes affect the public API.
-
Required: All new features and bug fixes must include appropriate unit tests.
-
Framework: Use
unittest
,pytest
, or a similar testing framework. -
Test Location: Place tests in the
tests/
directory, mirroring the structure ofswarms_Models/
. -
Test Coverage: Aim for high test coverage to ensure code reliability.
-
Running Tests: Provide instructions for running tests.
pytest tests/
- PEP 8 Compliance: Follow PEP 8 style guidelines.
- Linting Tools: Use
flake8
,black
, orpylint
to check code style. - Consistency: Maintain consistency with the existing codebase.
We have several areas where contributions are particularly welcome.
- Goal: Increase test coverage to ensure the library's robustness.
- Tasks:
- Write unit tests for existing code in
swarms_Models/
. - Identify edge cases and potential failure points.
- Ensure tests are repeatable and independent.
- Write unit tests for existing code in
- Goal: Maintain clear and comprehensive documentation for users and developers.
- Tasks:
- Update docstrings to reflect any changes.
- Add examples and tutorials in the
examples/
directory. - Improve or expand the content in the
docs/
directory.
- Goal: Provide scripts for training all model architectures implemented in the library.
- Tasks:
- Develop training scripts with configurable parameters.
- Include examples of how to use the scripts in the
examples/
directory. - Ensure scripts are well-documented and tested.
- Communication: Engage with the community by participating in discussions on issues and pull requests.
- Respect: Maintain a respectful and inclusive environment.
- Feedback: Be open to receiving and providing constructive feedback.
By contributing to swarm-models, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to swarm-models! Your efforts help make this project better for everyone.
If you have any questions or need assistance, please feel free to open an issue or reach out to the maintainers.