Skip to content

Conversation

@FilippoOlivo
Copy link
Member

@FilippoOlivo FilippoOlivo commented Nov 12, 2025

Description

Refactoring of Dataset, DataLoader and DataModule to improve maintainability, flexibility and scalability. Specifically the following restructuring will be applied:

  • Refactoring Condition:
    • Restructure inheritance
    • Add __getitem__ method
    • Add create_dataloaders method
    • Add __len__ method
    • Remove "data attributes" and add a dictionary self.data
    • (Optional) add compute_residual function (maybe in a later PR)
  • Dataset: create a class which manage subset of conditions (contains the condition and the indices)
  • Datamodule
    • Create _Creator class (store Dataloaders)
    • Create _Aggregator class (iterable class which is passed when a dataloader is requested by Lightning)

Checklist

  • Code follows the project’s Code Style Guidelines
  • Tests have been added or updated
  • Documentation has been updated if necessary
  • Pull request is linked to an open issue

@FilippoOlivo FilippoOlivo changed the base branch from master to dev November 12, 2025 15:09
@dario-coscia dario-coscia mentioned this pull request Nov 18, 2025
4 tasks
@FilippoOlivo FilippoOlivo self-assigned this Nov 21, 2025
@FilippoOlivo FilippoOlivo added enhancement New feature or request pr-to-fix Label for PR that needs modification low priority Low priority fix labels Nov 21, 2025
@FilippoOlivo FilippoOlivo linked an issue Dec 12, 2025 that may be closed by this pull request
@GiovanniCanali GiovanniCanali added the 0.3 Related to 0.3 release label Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0.3 Related to 0.3 release enhancement New feature or request low priority Low priority fix pr-to-fix Label for PR that needs modification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve DataModule flexibility

2 participants