Skip to content

Commit

Permalink
fix (Dataset): Make DfDataset and GenericDataset abstract (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
aiakide committed Dec 19, 2023
1 parent 2242721 commit fb45374
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion niceml/data/datasets/dfdataset.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module for dfdataset"""
from abc import ABC
from dataclasses import dataclass
from typing import List, Union, Optional, Any

Expand Down Expand Up @@ -71,7 +72,7 @@ def __getattr__(self, item) -> Any:
return self.data[item]


class DfDataset(Dataset): # pylint: disable=too-many-instance-attributes
class DfDataset(Dataset, ABC): # pylint: disable=too-many-instance-attributes
"""Dataset for dataframes"""

def __init__( # ruff: noqa: PLR0913
Expand Down
3 changes: 2 additions & 1 deletion niceml/data/datasets/genericdataset.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""module for generic dataset implementation"""
from abc import ABC
from typing import Dict, List, Optional


Expand All @@ -20,7 +21,7 @@
)


class GenericDataset(Dataset):
class GenericDataset(Dataset, ABC):
"""Generic dataset implementation. This is a flexible dataset for multiple
use cases. It can be used for classification, segmentation, object detection, etc.
For specific frameworks, there are subclasses of this class, e.g. KerasGenericDataset
Expand Down

0 comments on commit fb45374

Please sign in to comment.