First off, thank you for considering contributing to MLM-101! 🎉
The following is a set of guidelines for contributing to this course repository. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
- Code of Conduct
- How Can I Contribute?
- Development Setup
- Pull Request Process
- Style Guidelines
- Community
This project and everyone participating in it is governed by our commitment to creating a welcoming and inclusive environment. By participating, you are expected to uphold this standard. Please report unacceptable behavior to hello@flowdiary.ai.
Be respectful, be kind, be collaborative.
Before creating bug reports, please check existing issues to avoid duplicates.
How to Submit a Good Bug Report:
- Use a clear and descriptive title
- Describe the exact steps to reproduce the problem
- Provide specific examples (code snippets, screenshots)
- Describe the behavior you observed and what you expected
- Include environment details:
- OS (macOS, Windows, Linux)
- Python version (
python --version) - Package versions (
pip list)
Template:
## Bug Description
[Clear description of the bug]
## Steps to Reproduce
1. Go to '...'
2. Run command '...'
3. See error
## Expected Behavior
[What should happen]
## Actual Behavior
[What actually happens]
## Environment
- OS: macOS 13.0
- Python: 3.10.5
- Dependencies: See attached pip listWe welcome suggestions for new features, projects, or notebooks!
Before Suggesting:
- Check if the enhancement has already been suggested
- Consider if it fits the course scope (beginner to advanced ML)
How to Suggest:
- Open a GitHub Issue with the label
enhancement - Provide a clear title and description
- Explain why this enhancement would be useful
- Include examples or mockups if applicable
Areas to Contribute:
- 🐛 Bug fixes
- 📓 New Jupyter notebooks
- 🚀 New projects (with datasets)
- 🧪 Unit tests
- 🔧 Utility scripts
- 🌐 Deployment examples
Process:
-
Fork the repository
git clone https://github.com/YOUR_USERNAME/MLM-101.git cd MLM-101 -
Create a feature branch
git checkout -b feature/your-feature-name
-
Make your changes
- Follow the Style Guidelines
- Add tests if applicable
- Update documentation
-
Test your changes
# Run notebooks jupyter nbconvert --to notebook --execute notebooks/your_notebook.ipynb # Run tests pytest tests/
-
Commit with clear messages
git add . git commit -m "Add feature: Brief description"
-
Push to your fork
git push origin feature/your-feature-name
-
Open a Pull Request on GitHub
Documentation improvements are always welcome!
What to Improve:
- Typos and grammar
- Clarifications and examples
- Missing setup instructions
- Better explanations in notebooks
- README updates
Small Changes:
- Can be submitted directly via GitHub's web interface
Larger Changes:
- Follow the Pull Request Process
git clone https://github.com/YOUR_USERNAME/MLM-101.git
cd MLM-101git remote add upstream https://github.com/flowdiary/MLM-101.git# Using venv
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Or using conda
conda create -n mlm101-dev python=3.10
conda activate mlm101-devpip install -r requirements.txt
# Install development dependencies
pip install pytest black flake8 nbconvertgit fetch upstream
git merge upstream/main✅ Code Quality:
- Code runs without errors
- Follows Python style guidelines (PEP 8)
- Includes comments where necessary
✅ Testing:
- Notebooks execute successfully
- Scripts run without errors
- Unit tests pass (if applicable)
✅ Documentation:
- README updated (if needed)
- Docstrings added to functions
- Comments added to complex code
✅ Clean Commits:
- Remove
.DS_Store,__pycache__,venv/ - No large binary files (>5MB)
- Commit messages are clear
-
Title: Clear and descriptive
- ✅ "Add sentiment analysis notebook with BERT"
- ❌ "Update stuff"
-
Description: Include:
- What changes were made
- Why the changes are needed
- Related issues (if any)
- Screenshots (for UI changes)
-
Review:
- Be responsive to feedback
- Make requested changes promptly
- Engage in discussion professionally
Example PR Description:
## Description
Adds a new notebook demonstrating sentiment analysis using BERT transformers.
## Changes
- Created `notebooks/03_nlp/sentiment_analysis_bert.ipynb`
- Added requirements for transformers library
- Updated README with BERT example
## Related Issues
Closes #45
## Screenshots
[If applicable]
## Checklist
- [x] Code runs successfully
- [x] Notebook executes without errors
- [x] Documentation updated
- [x] No large files committedFollow PEP 8:
# Good
def train_model(X_train, y_train, model_type='decision_tree'):
"""
Train a machine learning model.
Args:
X_train: Training features
y_train: Training labels
model_type: Type of model to train
Returns:
Trained model object
"""
if model_type == 'decision_tree':
model = DecisionTreeClassifier()
model.fit(X_train, y_train)
return model
# Bad
def TrainModel(x,y,t):
m=DecisionTreeClassifier()
m.fit(x,y)
return mFormatting:
- Use 4 spaces for indentation (not tabs)
- Max line length: 88 characters (Black formatter)
- Use meaningful variable names
Run Black formatter:
black your_script.pyStructure:
- Title and description (Markdown)
- Import statements (Code cell)
- Load data (Code cell with explanation)
- EDA (Markdown + Code cells)
- Model training (Code cells with Markdown headers)
- Evaluation (Code + visualizations)
- Conclusion (Markdown)
Best Practices:
- Clear Markdown headers for sections
- Explain each code cell with comments or Markdown
- Include outputs for all cells
- Restart kernel and run all cells before committing
Format:
<type>: <subject>
<body (optional)>
<footer (optional)>
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Formatting (no code change)refactor: Code restructuringtest: Adding testschore: Maintenance tasks
Examples:
feat: Add BERT sentiment analysis notebook
fix: Correct data preprocessing in fraud detection project
docs: Update installation instructions for Windows users
refactor: Reorganize notebooks into topic folders- 📧 Email: hello@flowdiary.ai
- 💬 Discussions: GitHub Discussions
- 🐛 Issues: GitHub Issues
Contributors will be acknowledged in:
- README.md Acknowledgments section
- Release notes (for significant contributions)
Don't hesitate to ask! Open a Discussion or email us.
Thank you for contributing to MLM-101! 🚀
Made with ❤️ by the MLM-101 community