Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add excluding to run_for_all_configs_of_type #41

Merged
merged 1 commit into from
Aug 26, 2024
Merged

Conversation

lebrice
Copy link
Collaborator

@lebrice lebrice commented Aug 23, 2024

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 [email protected]

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

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

Additional details and impacted files
@@            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              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lebrice lebrice merged commit 3e1e522 into master Aug 26, 2024
6 checks passed
@lebrice lebrice deleted the add_exclude_option branch August 26, 2024 15:41
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.

3 participants