Skip to content

Coverage improvements#71

Merged
johanos1 merged 5 commits intomainfrom
coverage_improvements
Jan 24, 2026
Merged

Coverage improvements#71
johanos1 merged 5 commits intomainfrom
coverage_improvements

Conversation

@johanos1
Copy link
Collaborator

Improve coverage

…solated

- tests/utils/test_utils.py: 24 tests for utility functions
- tests/ml/models/test_losses.py: 11 tests for loss functions (2 skipped - DAMLoss bug)
- tests/ml/models/test_torch_models.py: 11 tests for LogisticRegressor and MLP
- tests/ml/training/test_federated.py: 7 tests for federated training
- tests/ml/training/test_isolated.py: 8 tests for isolated training

Total: 61 new tests (59 passing, 2 skipped)
- Subtract margin only from target class logit (not all logits)
- Pass integer targets to cross_entropy (not float)
- Enable previously skipped tests
… hyperparameter tuning

- tests/ml/models/test_gnn_models.py: 18 tests for GCN, GAT, GraphSAGE
- tests/ml/models/test_base.py: 17 tests for TorchBaseModel, SklearnBaseModel
- tests/ml/training/test_hyperparameter_tuning.py: 14 tests for HyperparamTuner
- tests/ml/training/test_centralized.py: 8 tests for centralized training
- tests/ml/clients/test_sklearn_client.py: 12 tests for SklearnClient

Total: 69 new tests (all passing)
Phase 3 (Torch clients & server):
- tests/ml/clients/test_torch_client.py: 11 tests for TorchClient
- tests/ml/clients/test_torch_geometric_client.py: 10 tests for TorchGeometricClient
- tests/ml/servers/test_torch_server.py: 18 tests for TorchServer

Phase 4 (Data creation & config):
- tests/data_creation/unit/test_generator.py: 19 tests for DataGenerator
- tests/utils/test_config.py: 12 additional tests for config loaders

Total: 70 new tests, bringing unit test count to 494.
@johanos1 johanos1 merged commit 2351dd4 into main Jan 24, 2026
1 check passed
@johanos1 johanos1 deleted the coverage_improvements branch January 24, 2026 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant