-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Description
Daily Test Coverage Improver: Research and Plan
Repository Overview
Furnace is a tensor library with support for differentiable programming, designed for machine learning, probabilistic programming, and optimization. Key characteristics:
- Technology Stack: F#/.NET Core, uses TorchSharp and LibTorch for backend support
- Backends: Reference backend and Torch backend
- Main Components:
- Core tensor operations (
Furnace.Core) - Reference backend (
Furnace.Backends.Reference) - Torch backend (
Furnace.Backends.Torch) - Data utilities (
Furnace.Data)
- Core tensor operations (
Current Testing Strategy
- Test Framework: Uses .NET test framework with
dotnet test - Test Location: Main tests in
tests/Furnace.Tests/directory - Test Structure: Comprehensive test suite with files like:
TestTensor.fs- Core tensor functionalityTestDerivatives.fs- Derivative operationsTestModel.*.fs- Various model componentsTestOp.*.fs- Specific operations- Backend-specific tests
Current Coverage Analysis
From the coverage report in /coverage/Summary.txt:
Overall Coverage Statistics:
- Line Coverage: 76.3% (1907/2497 lines covered)
- Branch Coverage: 45.8% (3137/6842 branches covered)
- Method Coverage: 67.7% (838/1236 methods covered)
Component-Specific Coverage:
-
Furnace.Backends.Reference: 73.4% line coverage
- Opportunity: Several tensor types have low coverage (BFloat16: 51.5%, Bool: 57.1%, Float16: 51.5%)
- Critical:
Utilsclass has 0.0% coverage
-
Furnace.Backends.Torch: 84.2% line coverage
- Generally well-covered, several ops at 100%
- Opportunity:
Utilsat 68.2%,TorchRawTensorat 82.6%
-
Furnace.Data: 62.7% line coverage
- Critical:
MNISThas 0.0% coverage - Critical:
Pyplothas 0.0% coverage - Opportunity:
helpersat 44.1%
- Critical:
Build and Coverage Commands
Based on analysis of the repository:
# Build the project
dotnet build
# Run tests
dotnet test
# Generate coverage (appears to use a coverage tool, likely dotnet-coverage or similar)
# Command structure needs to be determined from existing CI/workflow filesTest Organization Strategy
Tests are well-organized by:
- Functionality: Separate files for different operations (derivatives, models, tensor ops)
- Backend: Testing both Reference and Torch backends
- Components: Each major component has dedicated test files
New tests should follow this pattern and be added to existing test files or new files in tests/Furnace.Tests/.
Priority Areas for Coverage Improvement
High Priority (0% coverage):
Furnace.Backends.Reference.Utils- Critical infrastructure codeFurnace.Data.MNIST- Important data loading functionalityFurnace.Data.Pyplot- Visualization utilities
Medium Priority (Low coverage):
Furnace.Util.helpers(44.1%) - Utility functions- Reference backend tensor types with ~50% coverage (BFloat16, Bool, Float16)
- Branch coverage improvements across all components (currently 45.8%)
Strategies for Major Coverage Improvements:
- Edge case testing - Many branches likely represent error conditions and edge cases
- Type-specific operations - Test operations across all supported tensor types
- Integration testing - Test interactions between components
- Error condition testing - Test exception paths and error handling
Questions for Maintainers
- Are there specific testing patterns or conventions to follow?
- Are there any areas of code that should NOT be tested (e.g., deprecated functionality)?
- What coverage tool/command is used to generate the current reports?
- Are there performance-sensitive areas where test additions should be careful?
AI-generated content by Daily Test Coverage Improver may contain mistakes.
Metadata
Metadata
Assignees
Labels
No labels