mila-iqia / ResearchTemplate

WIP: Research Template Repository
5 stars 1 forks source link

Add `excluding` to `run_for_all_configs_of_type` #41

Closed lebrice closed 1 month ago

lebrice commented 1 month ago

Add an excluding parameter to run_for_all_configs_of_type, which should be helpful to @cmvcordova in his PR #39:

The example_test.py module could be changed to exclude the hugging face networks, for example:

# note: replace the `PretrainedModel` below with the base class of all text models in `transformers` (pretrained or not)
@run_for_all_configs_of_type("datamodule", ImageClassificationDataModule)
@run_for_all_configs_of_type("network", torch.nn.Module, excluding=transformers.PretrainedModel) 
class TestExampleAlgo(LearningAlgorithmTests[ExampleAlgorithm]):
    ...

Signed-off-by: Fabrice Normandin normandf@mila.quebec

codecov-commenter commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 66.25%. Comparing base (eec1563) to head (1d6150f).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #41 +/- ## ========================================== + Coverage 66.21% 66.25% +0.04% ========================================== Files 52 52 Lines 2921 2925 +4 ========================================== + Hits 1934 1938 +4 Misses 987 987 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.