-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
actually added the dataloader and test files
- Loading branch information
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |