Skip to content

🐛 Fix MNIST test dataloader for shifted data #135

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

Merged
merged 7 commits into from
Mar 7, 2025

Conversation

tonyzamyatin
Copy link
Contributor

Testing on the MNISTDataModule inside a ClassifcationRoutine with eval_shifted=True set would raise a ValueError("No samples to concatenate") when self.test_shift_metrics.compute() was called inside the ClassificationRoutine, because test_dataloader() did not actually return the test dataloader with the shifter data.

Also, MNISTC was missing the property shift_severity which is referenced inside ClassificationRoutine.

@o-laurent o-laurent changed the base branch from main to dev March 7, 2025 09:39
@o-laurent o-laurent self-requested a review March 7, 2025 10:10
@o-laurent o-laurent added the bug Something isn't working label Mar 7, 2025
@o-laurent o-laurent self-assigned this Mar 7, 2025
Copy link
Contributor

@o-laurent o-laurent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR! I'll make the changes highlighted in the comments.

Copy link

codecov bot commented Mar 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.16%. Comparing base (7d0d345) to head (d4d09f5).
Report is 10 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #135   +/-   ##
=======================================
  Coverage   99.15%   99.16%           
=======================================
  Files         143      143           
  Lines        7136     7145    +9     
  Branches      910      912    +2     
=======================================
+ Hits         7076     7085    +9     
  Misses         27       27           
  Partials       33       33           
Flag Coverage Δ
cpu 99.16% <100.00%> (+<0.01%) ⬆️
pytest 99.16% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@o-laurent o-laurent merged commit 156aa91 into ENSTA-U2IS-AI:dev Mar 7, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants