Skip to content

Conversation

@Andrewwango
Copy link
Collaborator

@Andrewwango Andrewwango commented Jul 21, 2025

Changes as follows:

Overhaul datasets

  • Adds dataset base class with lots of checks
  • Datasets inherit from base class, simplifying their implementations
  • Adds ImageFolder and TensorDataset classes
  • More unified dataset tests
  • Much better dataset docs + guide
  • PatchDataset returns tensors and not tuples
  • Clean thorough example for defining datasets

Overhaul examples + quickstart

  • Quickstart examples + one very simple 5-minute quickstart tutorial (closes Clear quickstart examples #571 )
  • Organises examples: basics section is now indeed basics; add "Models" and "Physics" sections
  • Defining physics -> better cleaner example
  • Training your own model -> better cleaner example (to sit alongside Trainer compatibility with Denoiser #593 )
  • Pretrained reconstructors Guide + Example
  • Finetuning example (to clean up after RAM #524 merged)
  • README and index now cleaner
  • Custom ordering

Minor fixes

Notes

  • Quickstart requires the redirect (rather than inserting auto_examples/basics/demo_quickstart into index toctree otherwise the left sidebar doesn't show up in the quickstart example??

Checks to be done before submitting your PR

  • python3 -m pytest deepinv/tests runs successfully.
  • black . runs successfully.
  • make html runs successfully (in the docs/ directory).
  • Updated docstrings related to the changes (as applicable).
  • Added an entry to the CHANGELOG.rst.

Todo

  • Add quickstart tutorial notebook to colab and replace original colab link in readme/index
  • Switch all temp models over to RAM after RAM #524 merged
  • finetuning example has more modalities from pretrained example. finetuning example links out to custom physics + data at end + what's next?
  • "New to DeepInverse?" auto add to all examples?

@codecov
Copy link

codecov bot commented Jul 21, 2025

Codecov Report

❌ Patch coverage is 87.47433% with 61 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@02d2563). Learn more about missing BASE report.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
deepinv/datasets/base.py 81.02% 17 Missing and 9 partials ⚠️
deepinv/datasets/utils.py 56.25% 4 Missing and 3 partials ⚠️
deepinv/tests/test_datasets.py 96.29% 2 Missing and 3 partials ⚠️
deepinv/datasets/datagenerator.py 80.00% 1 Missing and 3 partials ⚠️
deepinv/physics/tomography.py 55.55% 4 Missing ⚠️
deepinv/utils/demo.py 84.61% 4 Missing ⚠️
deepinv/datasets/fastmri.py 80.00% 1 Missing and 1 partial ⚠️
deepinv/datasets/lsdir.py 66.66% 1 Missing and 1 partial ⚠️
deepinv/datasets/patch_dataset.py 81.81% 1 Missing and 1 partial ⚠️
deepinv/loss/metric/metric.py 71.42% 2 Missing ⚠️
... and 2 more
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #622   +/-   ##
=======================================
  Coverage        ?   83.17%           
=======================================
  Files           ?      200           
  Lines           ?    19356           
  Branches        ?     2626           
=======================================
  Hits            ?    16099           
  Misses          ?     2370           
  Partials        ?      887           

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

This was referenced Jul 21, 2025
Merged
@Andrewwango Andrewwango changed the title Better quickstart docs Better quickstart docs + dataset base class Jul 28, 2025
@Andrewwango Andrewwango mentioned this pull request Aug 1, 2025
5 tasks
@Andrewwango Andrewwango changed the title Better quickstart docs + dataset base class Overhaul examples + datasets Aug 1, 2025
@Andrewwango Andrewwango requested a review from tachella August 8, 2025 12:18
Copy link
Collaborator

@jscanvic jscanvic left a comment

Choose a reason for hiding this comment

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

Thanks Andrew! Just one last LaTeX annoyance

Copy link
Collaborator

@mh-nguyen712 mh-nguyen712 left a comment

Choose a reason for hiding this comment

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

My latest comments, mostly minor typos.
Look really good! Thanks for the hard work Andrew!

Copy link
Collaborator

@jscanvic jscanvic left a comment

Choose a reason for hiding this comment

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

LGTM thanks!

@mh-nguyen712
Copy link
Collaborator

Please make sure the Colab quickstart notebook is updated correctly, @Andrewwango. I checked the last generated docs, and it seems they were not based on the latest version and the pip install deepinv block was missing.

I’ll approve the PR once the tests have passed.

Copy link
Contributor

@tachella tachella left a comment

Choose a reason for hiding this comment

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

my (I believe) final comments, I think the PR is looking great

@Andrewwango Andrewwango requested a review from tachella August 11, 2025 07:44
@Andrewwango Andrewwango mentioned this pull request Aug 11, 2025
6 tasks
@Andrewwango Andrewwango removed the request for review from samuro95 August 12, 2025 12:21
Copy link
Contributor

@tachella tachella left a comment

Choose a reason for hiding this comment

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

LGTM

@Andrewwango Andrewwango merged commit ac36da6 into deepinv:main Aug 12, 2025
9 checks passed
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.

MoDL docs failing load_example docs British English -> American English Should this be ZeroNoise()? Clear quickstart examples

4 participants