Skip to content

torchquad v0.5.0

Latest

Choose a tag to compare

@gomezzz gomezzz released this 03 Aug 19:04

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-level tests/ 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

  1. No Breaking API Changes: All public APIs remain backward compatible
  2. Improved GPU Setup: The GPU selection process is now more robust - you may see improved performance if you were experiencing GPU-related issues
  3. Better Logging: If you were relying on specific log messages, note that some logging behavior has been refined
  4. Enhanced Documentation: Check out the new parametric integration guide for advanced use cases

For Contributors

  1. Test Location: Tests have moved from torchquad/tests/ to tests/ - update any scripts or IDE configurations accordingly
  2. Packaging: The project now uses pyproject.toml instead of setup.py - use modern Python packaging tools
  3. 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

New Contributors

Full Changelog: v0.4.1...v0.5.0