mirror of
https://github.com/rushil-thareja/dp-fusion-lib.git
synced 2026-04-24 12:06:23 +02:00
- Token-level differential privacy for LLMs - Integration with Document Privacy API - Comprehensive test suite and documentation - Examples and Jupyter notebook included
2.2 KiB
2.2 KiB
Contributing to DP-Fusion-Lib
Thank you for your interest in contributing to DP-Fusion-Lib! This document provides guidelines for contributing.
Code of Conduct
Please be respectful and constructive in all interactions.
Getting Started
Development Setup
-
Clone the repository:
git clone https://github.com/rushil-thareja/dp-fusion-lib.git cd dp-fusion-lib -
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate -
Install in development mode:
pip install -e ".[dev]" -
Install pre-commit hooks (optional):
pre-commit install
Running Tests
pytest tests/ -v
With coverage:
pytest tests/ -v --cov=dp_fusion_lib --cov-report=term-missing
Code Style
We use:
- black for code formatting
- ruff for linting
Format code:
black src/ tests/ examples/
Check linting:
ruff check src/ tests/ examples/
Making Changes
Branch Naming
feature/description- New featuresfix/description- Bug fixesdocs/description- Documentation changesrefactor/description- Code refactoring
Commit Messages
Use clear, descriptive commit messages:
feat: Add support for batch generationfix: Handle edge case in lambda searchdocs: Update installation instructionstest: Add tests for epsilon computation
Pull Requests
- Create a feature branch from
main - Make your changes
- Add tests for new functionality
- Ensure all tests pass
- Update documentation if needed
- Submit a pull request
Reporting Issues
Bug Reports
Please include:
- Python version
- Package versions (torch, transformers, dp-fusion-lib)
- Minimal code to reproduce the issue
- Expected vs actual behavior
- Full error traceback
Feature Requests
Please include:
- Clear description of the feature
- Use case / motivation
- Possible implementation approach (optional)
Questions
For questions about using the library, please open a GitHub issue with the "question" label.
License
By contributing, you agree that your contributions will be licensed under the same license as the project (see LICENSE file).