Skip to content

Increase code test coverage to 80% #57

Description

@emapuljak

Description

Combined test coverage of src/ is currently 43% (measured across both backends with --cov-append), well below the 80% target. The fail_under gate is set low provisionally so CI can go green; this issue tracks backfilling tests and raising the gate to 80%.

Note: 43% is a floor — it was measured with ~121 tests failing (CUDA/backend-gating issues). Re-measure once the suite is green before setting intermediate targets.

Biggest gaps

Module Coverage Statements
core/torch/fit_compress.py 0% 474
core/torch/distillers.py 0% 315
core/torch/pruning_methods/fitcompress.py 0% 33
core/utils.py 0% 41
core/torch/train.py 6% 38
core/torch/optimizers.py 14% 45
core/torch/layers.py 48% 1244

fit_compress.py + distillers.py alone are ~790 untested statements (~8.5% of the codebase).

Tasks

  • Re-measure combined coverage once the test suite passes cleanly.
  • Add tests for the FitCompress path (fit_compress.py, pruning_methods/fitcompress.py).
  • Add tests for distillers.py.
  • Cover core/utils.py, core/torch/train.py, core/torch/optimizers.py.
  • Raise fail_under in pyproject.toml incrementally (e.g. 60 → 80) as coverage lands.

Acceptance Criteria

  • Combined coverage across both backends is ≥ 80%.
  • [tool.coverage.report] fail_under = 80 and the CI coverage job passes.
  • No module listed above remains at 0%.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions