Releases: esa/torchquad
torchquad v0.5.0
torchquad 0.5.0 Release Notes
We are excited to announce the release of torchquad 0.5.0! This release includes significant structural improvements, enhanced GPU support, better documentation, and improved testing infrastructure.
Major Changes
🏗️ Project Structure Modernization
- Migrated to pyproject.toml: Transitioned from setup.py to modern Python packaging standards with pyproject.toml configuration (#223)
- Test Suite Restructuring: Moved all tests from
torchquad/tests/
to root-leveltests/
directory, following Python best practices (#218) - Code Formatting: Standardized code formatting with Black using 100-character line length across the entire codebase
🖥️ Enhanced GPU Support & Backend Management
- Improved GPU Selection: Enhanced GPU device selection and management with better error handling and user guidance (#222)
- Backend Precision Control: Significant improvements to the
set_precision
utility with better backend compatibility and GPU memory management - CUDA Integration: Fixed and improved PyTorch CUDA integration for more reliable GPU acceleration
📚 Documentation Enhancements
- Parametric Integration Guide: Added comprehensive documentation for parametrizing integration domains with practical examples (#219)
- GPU Usage Tutorial: Extensive documentation covering GPU setup, device selection, and optimization tips
- CI/CD Documentation: Added detailed documentation about the continuous integration and deployment processes
🔧 Improved Logging & Debugging
- Release-Friendly Logging: Implemented conditional logging that can be disabled for production releases while maintaining verbose output for development (#221)
- Better Warning Management: Enhanced warning filtering and management throughout the codebase
- Loguru Integration: Improved integration with the loguru logging framework for better debugging experience
Minor Changes
🧪 Testing Infrastructure
- Expanded Test Suite: Added comprehensive tests for deployment scripts and RNG functionality (#224)
- Additional Test Functions: Introduced new challenging test functions for better convergence testing
- CI Warning Filtering: Implemented systematic filtering of known warnings in CI to reduce noise
- Better Test Organization: Cleaned up test imports and reduced code duplication across test files
📊 Benchmarking Improvements
- Enhanced Benchmarks: Reworked benchmarking system with better scaling analysis and framework comparisons (#220)
- Analytical Ground Truths: Added analytical reference values for more accurate convergence testing
- Updated Performance Visualizations: Refreshed benchmark plots and scaling analysis charts
🔍 Code Quality
- Code Formatting: Applied consistent formatting using Black with flake8 compliance
- Better Error Messages: Enhanced error handling with more informative exception messages
Bugfixes
🐛 Integration & Numerical Fixes
- Gaussian Integration: Fixed edge cases in Gaussian quadrature with improved error margins
- VEGAS Algorithm: Resolved issues with VEGAS map updates and stratification
- Grid Integration: Fixed coordinate transformation bugs in grid-based methods
- Memory Management: Improved GPU memory cleanup and garbage collection
🔧 Backend Compatibility
- Multi-Backend Support: Fixed compatibility issues across PyTorch, JAX, TensorFlow, and NumPy backends
- Precision Handling: Resolved dtype conversion issues when switching between different numerical precisions
- Device Management: Fixed GPU device selection and fallback behavior for systems without CUDA
📦 Packaging & Deployment
- Setup Script: Fixed setup.py configuration issues for proper package installation
- Dependencies: Updated and validated all package dependencies for compatibility
- CI/CD Pipeline: Resolved deployment issues to PyPI and TestPyPI
Migration Guide
For Users Upgrading from 0.4.x
- No Breaking API Changes: All public APIs remain backward compatible
- Improved GPU Setup: The GPU selection process is now more robust - you may see improved performance if you were experiencing GPU-related issues
- Better Logging: If you were relying on specific log messages, note that some logging behavior has been refined
- Enhanced Documentation: Check out the new parametric integration guide for advanced use cases
For Contributors
- Test Location: Tests have moved from
torchquad/tests/
totests/
- update any scripts or IDE configurations accordingly - Packaging: The project now uses
pyproject.toml
instead ofsetup.py
- use modern Python packaging tools - Code Style: Code now uses 100-character line length - configure your formatter accordingly
Acknowledgments
Special thanks to all contributors who made this release possible. This release represents a significant step forward in making torchquad more robust, better documented, and easier to use across different computational backends and hardware configurations.
For detailed technical information about the changes, please refer to the individual pull requests linked above.
What's Changed
- release -> main for 0.4.1 by @gomezzz in #212
- release -> develop for 0.4.1 by @gomezzz in #213
- Fix Gaussian integrator on jax by @javier-garcia-tilburg in #215
- Moving tests outside module by @gomezzz in #218
- Adding docs for parametrizing integration domain by @gomezzz in #219
- Benchmarking the module by @gomezzz in #220
- Improve logging behaviour by @gomezzz in #221
- Improve gpu selection by @gomezzz in #222
- switching to pyproject.toml by @gomezzz in #223
- More test functions by @gomezzz in #224
- Better error handling, ignoring known warnings in CI by @gomezzz in #226
- main -> develop for Release 0.5.0 by @gomezzz in #227
- develop -> release for Release 0.5.0 by @gomezzz in #228
- Release -> main by @gomezzz in #229
New Contributors
- @javier-garcia-tilburg made their first contribution in #215
Full Changelog: v0.4.1...v0.5.0
torchqad 0.4.1
Changelog
Major
N/A
Minor
- Fix compatibility with newer jax version (now requiring jax>=0.4.17)
- Use tensorflows global precision setting and related bugfixes
- Various CI fixes
- Small doc fixes and formatting
Detailed changes
- release -> main (for v0.4.0) by @gomezzz in #182
- release -> develop (for v0.4.0) by @gomezzz in #183
- Try allowing to skip coverage comment by @gomezzz in #191
- Hide PyTorch trace compilation warnings by @FHof in #185
- Update .readthedocs.yml by @gomezzz in #192
- Update tutorial.rst by @Astro-Lee in #193
- Update tutorial.rst by @Astro-Lee in #194
- Fix JIT compilation with TensorFlow >= 2.14.0 by @FHof in #197
- Switch black version by @gomezzz in #200
- main -> develop (Release 0.4.1) by @gomezzz in #209
- CI fixes by @gomezzz in #210
- develop -> release for 0.4.1 by @gomezzz in #211
New Contributors
- @Astro-Lee made their first contribution in #193
Full Changelog: v0.4.0...v0.4.1
torchquad v0.4.0
Changelog
Major
- Support for vectorized multiple integrand compute with one call
- Better support for custom integrators
- Added Gauss Legendre integration
Minor
- Various changes to tests
- Additional examples in docs and various docstring changes
- Workflow improvements for repo
- Added automatic test coverage investigation
- Small bugfixes
Detailed changes
- Release -> develop by @gomezzz in #151
- Release -> main by @gomezzz in #150
- Change the backend argument behaviour by @FHof in #154
- Fixing build badge by @gomezzz in #159
- Switching to CI to use mamba. by @gomezzz in #158
- main -> develop by @gomezzz in #161
- (feat): multi-dimensional integrand by @ilan-gold in #160
- Disable autoblack action commits by @gomezzz in #168
- (fix): use
static_argnums
forjax
jit
by @ilan-gold in #165 - (feat): add JIT integrator tests by @ilan-gold in #166
- Display test coverage reports on PRs by @gomezzz in #167
- Fixing coverage workflow by @gomezzz in #169
- Gaussian quadrature by @elastufka in #141
- (feat): add customization API for
IntegrationGrid
by @ilan-gold in #173 - main -> develop for Release 0.4.0 by @gomezzz in #174
- (chore): add and/or clean up
Gaussian
/GaussLegendre
docs by @ilan-gold in #176 - (chore): small doc improvements by @ilan-gold in #177
- develop -> release for Release 0.4.0 by @gomezzz in #175
- (fix): bump tolerances for some GPU tests by @ilan-gold in #179
- Type related errors with integration domain by @gomezzz in #181
New Contributors
- @ilan-gold made their first contribution in #160
- @elastufka made their first contribution in #141
Full Changelog: v0.3.0...v0.4.0
torchquad v0.3.0
Major
- Added support for NumPy, JAX, Tensorflow via autoray for most integrators. Refer to docs for more details.
- Support for (JIT) compilation of the integration, except VEGAS. Refer to docs for more details.
- Huge performance improvements to VEGAS
Minor
- More tests
- New environment variable called
TORCHQUAD_LOG_LEVEL
to conveniently control loglevel, default changed to "warning" - More strict code linting with flake8 and a corresponding small code cleanup
- Docs improvements
- Custom RNG class
- Refactoring of Newton-Cotes integrators
torchquad v0.2.4 - JOSS release
Release for Zenodo archiving for the JOSS publication
torchquad v0.2.3
Major
- Added support and test for complex integrands (except in VEGAS, WIP)
- Further vectorized VEGAS leading to significant performance improvements (still work to do though, currently VEGAS is faster on CPU)
- Transitioned to PyTorch 1.9.0
- Submitted paper to JOSS (currently in press)
- Expanded docs (example for computing gradients, minimal working example)
- Improved README
Minor
- Added automated tests for computed gradients
- Fixed gradient flow through all integrators (e.g. w.r.t domain)
- Fixed setting loglevel
- Switched to loguru as logger
- Removed benchmark notebook (more extensive benchmarking will follow in the future)
- Updated contribution guidelines
- Several small fixes in the docs
- Improved automated tests
- Added some performance and convergence plots to README
JOSS Paper Version
Tagged version for the JOSS proof. Based on torchquad 0.2.2 with some updates to documentations.
torchquad v0.2.1
Changelog
Major
Huge improvements to documentation
Added VEGAS Enhanced
Minor
Added Boole's rule
Migrated examples to docs
Updated requirements
Added option to set precision (float or double)
Improved comments
Added 10D unit test
torchquad v0.1.1-rc1
- Fixes to workflows
- Improved README
- Fixes in requirements.txt
- Fixes in setup.py
- More verbose errors when calling integrators with incompatible inputs
- Simpson's & Boole's Rule now automatically pick compatible numbers of points and will warn
- Small improvements to unit tests
torchquad v0.1.0-rc1
First version of torchquad.
The first version of torchquad enables n-dimensional integrations using torch / CUDA utilizing several Newton-Cotes formulas or a simple Monte Carlo Integration. This should already enable huge speedups compared to CPU-only libraries. Also it should be differentiable using torch. Please feel free to test it and get back to us to help us improve it!