Skip to content

Commit

Permalink
Ignore check
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobbieker committed Dec 5, 2023
1 parent 2742824 commit 560fda5
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions pvnet/data/wind_datamodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,19 @@ def __init__(
self.batch_size = batch_size
self.batch_dir = batch_dir

if batch_dir is not None:
if any([period != [None, None] for period in [train_period, val_period, test_period]]):
raise ValueError("Cannot set `(train/val/test)_period` with presaved batches")

self.train_period = [
None if d is None else datetime.strptime(d, "%Y-%m-%d") for d in train_period
]
self.val_period = [
None if d is None else datetime.strptime(d, "%Y-%m-%d") for d in val_period
]
self.test_period = [
None if d is None else datetime.strptime(d, "%Y-%m-%d") for d in test_period
]
#if batch_dir is not None:
# if any([period != [None, None] for period in [train_period, val_period, test_period]]):
# raise ValueError("Cannot set `(train/val/test)_period` with presaved batches")

self.train_period = [None, None]
# None if d is None else datetime.strptime(d, "%Y-%m-%d") for d in train_period
#]
self.val_period = [None, None]
# None if d is None else datetime.strptime(d, "%Y-%m-%d") for d in val_period
#]
self.test_period = [None, None]
# None if d is None else datetime.strptime(d, "%Y-%m-%d") for d in test_period
#]

self._common_dataloader_kwargs = dict(
shuffle=False, # shuffled in datapipe step
Expand Down

0 comments on commit 560fda5

Please sign in to comment.