Skip to content

Commit

Permalink
Rename the method according to #43 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
louisPoulain committed Jun 25, 2024
1 parent 0edf87d commit 1a7129a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions mlpp_lib/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class DataModule:
"""A class to encapsulate everything involved in mlpp data processing.
1. Take xarray objects or load and select variables from `.zarr` archives.
2. Filter, split, standardize.
2. Filter, split, normalize.
3. Load into mlpp `Dataset`
4. Reshape/mask as needed.
5. Serve the `Dataset` or wrap it inside a `DataLoader`
Expand Down Expand Up @@ -100,7 +100,7 @@ def setup(self, stage=None):
if self.filter is not None:
self.apply_filter()
self.select_splits(stage=stage)
self.standardize(stage=stage)
self.normalize(stage=stage)
self.as_datasets(stage=stage)

def load_raw(self):
Expand Down Expand Up @@ -152,7 +152,7 @@ def apply_filter(self):
LOGGER.info("Applying filter to features and targets.")
self.x, self.y = self.filter.apply(self.x, self.y)

def standardize(self, stage=None):
def normalize(self, stage=None):
LOGGER.info("Standardizing data.")

if self.normalizer is None:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def test_setup_test_default_fromfile(self, tmp_path: Path, data_transformer):
self.batch_dims,
self.splitter,
data_dir=tmp_path.as_posix() + "/",
data_transformer=data_transformer,
normalizer=data_transformer,
)
dm.setup("test")

Expand Down

0 comments on commit 1a7129a

Please sign in to comment.