Skip to content

Latest commit

 

History

History
159 lines (110 loc) · 7.54 KB

contribution_guide.md

File metadata and controls

159 lines (110 loc) · 7.54 KB

🚀 LLMetaLab Contribution Guide 🤝

Thank you for your interest in contributing to LLMetaLab! Your contributions are crucial for making this repository a central resource for anyone interested in Large Language Models (LLMs). We welcome all kinds of contributions—whether it's fixing a typo, suggesting new content, adding hands-on tutorials, or building new tools. Let's collaborate to push forward the boundaries of LLM innovation! 💡

🌟 How Can You Contribute?

1. Report Bugs and Issues 🐛

Found an issue or bug? Please let us know by opening an issue. Be as detailed as possible—screenshots, version details, and error messages are super helpful!

2. Propose Enhancements 💡

Have a great idea that could improve LLMetaLab? You can suggest new features, improvements, or even just conceptual changes. Submit an enhancement issue to start the conversation.

3. Write Content 📄

LLMetaLab covers several complex topics, and we want it to be as comprehensive as possible. You can contribute by:

  • Expanding existing topics.
  • Adding new topics within areas such as Retrieval-Augmented Generation (RAG), alignment, fine-tuning, or emerging research.
  • Writing tutorials, step-by-step guides, or practical examples.

If you'd like to contribute a new section, please open a new issue first to discuss the outline. This ensures alignment with the overall content strategy.

4. Code Contributions 🖥️

If you're interested in adding or improving code (tutorials, automation scripts, example projects), please:

  1. Fork the repository.
  2. Clone your fork locally and create a new branch for your changes.
    git clone https://github.com/YourUsername/LLMetaLab.git
    git checkout -b your-branch-name
  3. Make your changes and commit them. Ensure your code follows best practices and includes adequate documentation.
    git commit -m "Add your clear commit message here"
  4. Push the branch to your fork and open a pull request. Make sure you describe what you've done clearly.
    git push origin your-branch-name

5. Review Existing Pull Requests 🔍

A great way to contribute is to help review open pull requests. Your insights could help improve someone else's contribution and ensure high-quality additions.

🛠️ Setting Up Your Environment

To contribute effectively, follow these steps to set up your environment:

  1. Clone the Repo
    git clone https://github.com/astorfi/LLMetaLab.git
  2. Use Virtual Environments Create a virtual environment to isolate dependencies:
    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  3. Install Dependencies Make sure you have Python, Docker, and Git installed. You can install project dependencies by running:
    pip install -r requirements.txt
  4. Branching Create a branch before making changes:
    git checkout -b feature/your-feature-name

Contribution Requirements

To ensure consistency across contributions, please use the project_template directory in the repository as a base for new projects. This template contains all the necessary files and structure to help you get started quickly and meet the requirements below.

1. Use Docker for All Contributions 🐳

Every contribution must include a Dockerfile to ensure an isolated and reproducible environment:

  • Add a Dockerfile that includes all the necessary dependencies and configurations to run your code.
  • This allows us to ensure that your contribution works independently of other projects in the repository.
  • Refer to the project_template directory to see a sample Dockerfile and follow the structure provided.

2. Provide Dependencies in requirements.txt 📦

  • Each contribution must include a requirements.txt file that lists the exact dependencies your code needs.
  • This ensures that we can run your project with the correct library versions.
  • Refer to the project_template directory for a sample requirements.txt file.

3. Include Tests for Your Code 🧪

  • All contributions must include a test file (e.g., test_project.py) that tests the core functionality.
  • We use pytest for testing, and it should run successfully inside your Docker container.
  • Ensure that tests cover key parts of the code to guarantee reliability and robustness.
  • The project_template directory also contains an example test file for reference.

4. Ensure CI/CD Compatibility ⚙️

  • All contributions must pass our automated CI/CD pipeline, which will:

    • Detect projects and automatically build Docker containers.
    • Run the tests you provided inside the Docker container to validate functionality.
  • Only contributions that pass all checks will be merged.

    The CI/CD is configured using GitHub Actions. Make sure your Docker container builds and runs correctly using:

    - name: Build Docker container
      run: |
        cd ${{ matrix.project-path }}
        docker build -t my_project_image .
    
    - name: Run Docker container
      run: |
        cd ${{ matrix.project-path }}
        docker run my_project_image

🔄 How to Submit Changes

  1. Pull Request Guidelines:

    • Provide a clear and descriptive title for your pull request.
    • Include a brief summary of what your pull request changes or adds.
    • Link to the related issue, if applicable.
    • Describe the motivation and context for your changes.
  2. Check the Checklist before submitting a pull request:

    • Have you provided meaningful commit messages?
    • Have you checked for typos, grammar issues, and code formatting?
    • Have you linked any related issues?

Contribution Guidelines

  • Follow the Folder Structure: LLMetaLab follows a structured folder layout (see the README for full details). Ensure any new content is placed in the correct folder.
  • Documentation and Comments: Document your changes wherever necessary. Your contributions should be understandable to other readers and contributors.
  • Code Style: Follow PEP8 guidelines for Python. Maintain clean, readable, and reusable code. Use comments to explain non-obvious code logic.
  • Respect Diversity: We believe in maintaining a healthy and inclusive community. Be respectful when providing feedback and always assume good intentions.

🙌 First-Time Contributors Welcome!

We are always excited to work with new contributors! You can start by looking at issues labeled good first issue. These are beginner-friendly tasks that are perfect for anyone just getting started.

Here is an example of a good first issue that you could contribute to:

📢 Join the Conversation

  • Feedback: We value your insights. Feel free to provide feedback by opening an issue or commenting on ongoing discussions.

💌 Code of Conduct

We follow a Code of Conduct to ensure a welcoming environment for everyone. Please make sure you have read and understood the guidelines.


Thank you again for considering contributing to LLMetaLab. Let's collaborate, innovate, and make a positive impact in the world of Large Language Models together! 🌟