Skip to content

Commit

Permalink
base: make _name property abstract method
Browse files Browse the repository at this point in the history
- this will help to identify methods that needs to be implemented during coding and not during runtime
  • Loading branch information
aditya0by0 committed Jan 5, 2025
1 parent 862c8ef commit 7da8963
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion chebai/preprocessing/datasets/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,19 @@ def fold_dir(self) -> str:
return f"cv_{self.inner_k_folds}_fold"

@property
@abstractmethod
def _name(self) -> str:
raise NotImplementedError
"""
Abstract property representing the name of the data module.
This property should be implemented in subclasses to provide a unique name for the data module.
The name is used to create subdirectories within the base directory or `processed_dir_main`
for storing relevant data associated with this module.
Returns:
str: The name of the data module.
"""
pass

def _filter_labels(self, row: dict) -> dict:
"""
Expand Down

0 comments on commit 7da8963

Please sign in to comment.