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

Move to DataProcessor API #262

Merged
merged 34 commits into from
Nov 13, 2023
Merged

Conversation

dhpitt
Copy link
Collaborator

@dhpitt dhpitt commented Nov 7, 2023

This PR makes the following changes:

  • Creates a DataProcessor object that replaces the torchvision.Transforms approach to applying transforms inside datasets
  • Changes darcyand navier_stokes datasets to return DataProcessor objects
  • Moves the Transform object from output_encoder.py to transforms.py and makes it an abstract base class
  • Removes Callback classes that implement data preprocessing/postprocessing and changes them into DataPipeline classes
  • a small bug fix and name change from WandBLoggerCallback to BasicLoggerCallback

Copy link
Member

@JeanKossaifi JeanKossaifi left a comment

Choose a reason for hiding this comment

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

Looks good overall, thanks @dhpitt! I think we still need to polish a little the overall interface.

neuralop/training/trainer.py Outdated Show resolved Hide resolved
neuralop/training/trainer.py Outdated Show resolved Hide resolved
@@ -225,16 +225,16 @@ def on_val_end(self, *args, **kwargs):
for c in self.callbacks:
c.on_val_end(*args, **kwargs)

class SimpleWandBLoggerCallback(Callback):
class BasicLoggerCallback(Callback):
Copy link
Member

Choose a reason for hiding this comment

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

Why not BasicWandbCallback?

Copy link
Collaborator Author

@dhpitt dhpitt Nov 10, 2023

Choose a reason for hiding this comment

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

The logger is capable of logging to stdout when wandb_log = false

neuralop/datasets/transforms.py Outdated Show resolved Hide resolved
neuralop/datasets/output_encoder.py Outdated Show resolved Hide resolved
neuralop/datasets/data_transforms.py Show resolved Hide resolved
@dhpitt dhpitt changed the title Add DataPipeline to trainer class and example scripts Move to DataProcessor API Nov 13, 2023
@JeanKossaifi
Copy link
Member

Thanks @dhpitt, merging!

@JeanKossaifi JeanKossaifi merged commit e2daca6 into neuraloperator:main Nov 13, 2023
1 check 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.

None yet

2 participants