Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 21, 2023
1 parent 3839fe8 commit d74d7ed
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
10 changes: 4 additions & 6 deletions pvnet/data/datamodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@

import numpy as np
import torch
from torch.utils.data import DataLoader
from torch.utils.data.datapipes.datapipe import IterDataPipe
from torch.utils.data.datapipes.iter import FileLister
from torch.utils.data.datapipes._decorator import functional_datapipe

from lightning.pytorch import LightningDataModule
from ocf_datapipes.training.pvnet import pvnet_datapipe
from ocf_datapipes.utils.consts import BatchKey
from ocf_datapipes.utils.utils import stack_np_examples_into_batch

from torch.utils.data import DataLoader
from torch.utils.data.datapipes._decorator import functional_datapipe
from torch.utils.data.datapipes.datapipe import IterDataPipe
from torch.utils.data.datapipes.iter import FileLister


def copy_batch_to_device(batch, device):
Expand Down
4 changes: 1 addition & 3 deletions scripts/save_batches.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,11 @@

import hydra
import torch
from torch.utils.data import DataLoader
from torch.utils.data.datapipes.datapipe import IterDataPipe
from ocf_datapipes.training.pvnet import pvnet_datapipe
from ocf_datapipes.utils.utils import stack_np_examples_into_batch
from omegaconf import DictConfig, OmegaConf
from sqlalchemy import exc as sa_exc

from torch.utils.data import DataLoader
from tqdm import tqdm

from pvnet.data.datamodule import batch_to_tensor
Expand Down
4 changes: 1 addition & 3 deletions scripts/save_concurrent_batches.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
import hydra
import numpy as np
import torch
from torch.utils.data import DataLoader
from torch.utils.data.datapipes.datapipe import IterDataPipe
from ocf_datapipes.training.common import (
open_and_return_datapipes,
)
Expand All @@ -33,7 +31,7 @@
from ocf_datapipes.utils.utils import stack_np_examples_into_batch
from omegaconf import DictConfig, OmegaConf
from sqlalchemy import exc as sa_exc

from torch.utils.data import DataLoader
from tqdm import tqdm

from pvnet.data.datamodule import batch_to_tensor
Expand Down

0 comments on commit d74d7ed

Please sign in to comment.