docstr: Instantiate a generic dataset. Can either be splitted by the user
  or by the object.
  
  Parameters
  ----------
  train_path : Union[str, Path]
      The path to the training data. May be URL.
  validation_path : Union[str, Path]
      The path to the validation data. May be URL.
  test_path : Union[str, Path]
      The path to the test data. May be URL.
  categorical_features : list[str]
      The names of the categorical columns in the dataset.
  target_column : str
      The name of the target column in the dataset.
  extension : str, optional
      The extension type of the dataset files. Defaults to "parquet".
  
  Raises
  ------
  ValueErrorLiteral
      If any of the paths are invalid.
code: def __init__(
      self,
      target_feature: str,
      sensitive_feature: str,
      categorical_features: list[str] = [],
      dataset_path: Optional[Union[str, Path]] = None,
      train_path: Optional[Union[str, Path]] = None,
      validation_path: Optional[Union[str, Path]] = None,
      test_path: Optional[Union[str, Path]] = None,
      split_type: Literal["random", "feature"] = "random",
      split_values: dict[
          Literal["train", "validation", "test"], Any
      ] = DEFAULT_SPLIT,
      split_feature: Optional[str] = None,
      extension: str = "parquet",
      seed: int = 42,
  ):
      """Instantiate a generic dataset. Can either be splitted by the user
      or by the object.
  
      Parameters
      ----------
      train_path : Union[str, Path]
          The path to the training data. May be URL.
      validation_path : Union[str, Path]
          The path to the validation data. May be URL.
      test_path : Union[str, Path]
          The path to the test data. May be URL.
      categorical_features : list[str]
          The names of the categorical columns in the dataset.
      target_column : str
          The name of the target column in the dataset.
      extension : str, optional
          The extension type of the dataset files. Defaults to "parquet".
  
      Raises
      ------
      ValueErrorLiteral
          If any of the paths are invalid.
      """
      super().__init__()
  
      self.logger = create_logger("datasets.GenericDataset")
      self.logger.info("Instantiating a Generic dataset.")
  
      self.target_feature = target_feature
      self.sensitive_feature = sensitive_feature
      self.categorical_features = categorical_features
      if dataset_path:
          # Validate if other paths are None
          if train_path or validation_path or test_path:
              raise ValueError(
                  "If single dataset path is passed, the other paths must be None."
              )
          if url(dataset_path) or Path(dataset_path).exists():
              self.paths = [dataset_path]
              self.split_required = True
      else:
          # Validate if other paths exist
          if not (train_path and validation_path and test_path):
              raise ValueError(
                  "If multiple dataset paths are passed, the single path must be"
                  "`None`."
              )
          paths = [train_path, validation_path, test_path]
          self.paths = []
          for path in paths:
              # Check if it is an URL or a directory
              if url(path) or Path(path).exists():
                  self.paths.append(path)
              else:
                  raise ValueError(f"Invalid path: {path}")
          self.split_required = False
  
      self.extension = extension
      self._indexes = None
      self.seed = seed
      if self.split_required:
          self.split_type = split_type
          self.splits = split_values
          self.split_feature = split_feature
          self._validate_splits()
  
file_path: aequitas/src/aequitas/fairflow/datasets/generic.py
imports: from pathlib import Path
  from typing import Any, Literal, Optional, Union
  import pandas
  from validators import url
  from ..utils import create_logger
  from .dataset import Dataset
label_desc: Use image node_id 1 to create a new GenericDataset object from inherited base classes: Dataset with example: obj = GenericDataset(target_feature, sensitive_feature, categorical_features, dataset_path, train_path, validation_path, test_path, split_type, split_values, split_feature, extension, seed)