Thank you for your interest in contributing to Information Transform Compression! We welcome contributions from the community.
If you find a bug, please open an issue on GitHub with:
- A clear description of the problem
- Steps to reproduce the issue
- Expected vs actual behavior
- Your environment (Python version, OS, dependencies)
- Any relevant code or error messages
We love new ideas! For feature requests, please open an issue describing:
- The problem you're trying to solve
- Your proposed solution
- Any alternative approaches you've considered
- How it fits with ITC's information-theoretic philosophy
-
Fork the repository and create a new branch from
maingit checkout -b feature/your-feature-name
-
Make your changes
- Write clear, documented code
- Follow the existing code style
- Add tests for new functionality
- Update documentation as needed
-
Test your changes
# Run all tests pytest tests/ -v # Run specific test file pytest tests/test_information_analysis.py -v # Check code formatting (optional) black --check . flake8 .
-
Commit your changes
- Use clear, descriptive commit messages
- Reference related issues (e.g., "Fixes #123")
git commit -m "Add feature: Per-layer learning rate in quantization" -
Push and create a Pull Request
git push origin feature/your-feature-name
Then open a PR on GitHub with:
- Clear description of changes
- Motivation and context
- How you tested the changes
- Screenshots/examples if applicable
- Python: Follow PEP 8 style guide
- Docstrings: Use Google-style docstrings
- Type hints: Add type annotations for function parameters
- Comments: Explain why, not what (code should be self-explanatory)
Example:
def compute_idm(
entropy: float,
sensitivity: float,
redundancy: float,
size: int
) -> float:
"""
Compute Information Density Metric.
Args:
entropy: Shannon entropy in bits (0-8 typical range)
sensitivity: Sensitivity score (0-1)
redundancy: Redundancy score (0-1)
size: Number of parameters
Returns:
idm: Information density metric (higher = more important)
Formula:
IDM = (Entropy × Sensitivity) / (Size × (1 + Redundancy))
"""
# Implementation...High Priority:
- TensorFlow/JAX parser implementations
- Additional model architectures (T5, BART, Vision Transformers)
- Hardware-specific optimizations (CUDA, Intel, ARM)
- Calibration dataset utilities
- Accuracy evaluation benchmarks
Medium Priority:
- Visualization tools for information flow
- Documentation improvements
- Tutorial notebooks
- Example models and use cases
- Performance profiling tools
Research Contributions:
- Novel information metrics beyond entropy/sensitivity/redundancy
- Improved precision allocation algorithms
- Layer-wise adaptive compression strategies
- Quantization-aware training integration
- Neural architecture search with IDM guidance
All contributions must include tests:
# tests/test_new_feature.py
import pytest
from my_module import new_function
def test_new_function_basic():
"""Test basic functionality."""
result = new_function(input_data)
assert result == expected_output
def test_new_function_edge_cases():
"""Test edge cases and error handling."""
with pytest.raises(ValueError):
new_function(invalid_input)Update documentation for any user-facing changes:
- Update README.md for new features
- Add docstrings to all functions/classes
- Update SYSTEM_REPORT.md for architecture changes
- Add examples to demonstrate usage
Use clear, imperative commit messages:
Add feature: Per-channel quantization for Conv2d layers
- Implement per-channel scale/zero-point calculation
- Add tests for different tensor shapes
- Update documentation with examples
- Fixes #45
Types:
Add:New featureFix:Bug fixUpdate:Improvements to existing featuresDocs:Documentation onlyTest:Test-related changesRefactor:Code restructuring without functionality changes
-
Clone the repository
git clone https://github.com/makangachristopher/Information-Transform-Compression.git cd Information-Transform-Compression -
Create a virtual environment
python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate
-
Install in development mode
pip install -e . pip install pytest black flake8 # Development dependencies
-
Run tests to verify setup
pytest tests/ -v
- GitHub Issues: For bugs, features, and questions
- Pull Requests: For code contributions
- Discussions: For general questions and ideas
We are committed to providing a welcoming and inclusive environment:
- Be respectful and constructive
- Focus on what is best for the community
- Show empathy towards others
- Accept constructive criticism gracefully
- Give credit where it's due
By contributing to ITC, you agree that your contributions will be licensed under the MIT License.
If you have questions about contributing, feel free to:
- Open a GitHub Discussion
- Comment on related issues
- Reach out to the maintainers
Thank you for contributing to ITC! 🎉