Skip to content

Commit

Permalink
actually added the dataloader and test files
Browse files Browse the repository at this point in the history
  • Loading branch information
mooniean committed Jan 30, 2024
1 parent 0428338 commit 87f109b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/caked/dataloader.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from .base import AbstractDataLoader

class DiskDataLoader(AbstractDataLoader):
def __init__(self, pipeline: str, classes: list[str], dataset_size: int, save_to_disk: bool, training: bool) -> None:
super().__init__(pipeline, classes, dataset_size, save_to_disk, training)

def load(self):
return super().load()

def process(self):
return super().process()

def get_loader(self, split_size: float, batch_size: int):
return super().get_loader(split_size, batch_size)
7 changes: 7 additions & 0 deletions tests/test_io.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from src.caked.dataloader import DiskDataLoader
import pytest


def test_class_instantiation():
test_loader = DiskDataLoader(pipeline="test", classes="test", dataset_size=3, save_to_disk=False, training=True)
assert isinstance(test_loader, DiskDataLoader)

0 comments on commit 87f109b

Please sign in to comment.