class_docstr: Configuration class to store model parameters.
  
  Args:
      mode (ModelMode or str): The mode of the model. The possible values
          are:
  
              - :obj:`"binary_classification"`: A binary classification
                model.
  
              - :obj:`"multiclass_classification"`: A multiclass
                classification model.
  
              - :obj:`"regression"`: A regression model.
  
      task_level (ModelTaskLevel or str): The task-level of the model.
          The possible values are:
  
              - :obj:`"node"`: A node-level prediction model.
  
              - :obj:`"edge"`: An edge-level prediction model.
  
              - :obj:`"graph"`: A graph-level prediction model.
  
      return_type (ModelReturnType or str, optional): The return type of the
          model. The possible values are (default: :obj:`None`):
  
              - :obj:`"raw"`: The model returns raw values.
  
              - :obj:`"probs"`: The model returns probabilities.
  
              - :obj:`"log_probs"`: The model returns log-probabilities.
code: def __init__(
      self,
      mode: Union[ModelMode, str],
      task_level: Union[ModelTaskLevel, str],
      return_type: Optional[Union[ModelReturnType, str]] = None,
  ):
      self.mode = ModelMode(mode)
      self.task_level = ModelTaskLevel(task_level)
  
      if return_type is None and self.mode == ModelMode.regression:
          return_type = ModelReturnType.raw
  
      self.return_type = ModelReturnType(return_type)
  
      if (
          self.mode == ModelMode.regression
          and self.return_type != ModelReturnType.raw
      ):
          raise ValueError(
              f"A model for regression needs to return raw "
              f"outputs (got {self.return_type.value})"
          )
  
      if (
          self.mode == ModelMode.binary_classification
          and self.return_type
          not in [ModelReturnType.raw, ModelReturnType.probs]
      ):
          raise ValueError(
              f"A model for binary classification needs to return raw "
              f"outputs or probabilities (got {self.return_type.value})"
          )
  
imports: from dataclasses import dataclass
  from enum import Enum
  from typing import Optional, Union
  from torch_geometric.utils.mixin import CastMixin
label_desc: Use image node_id 1 to create a new ModelConfig object from inherited base classes: CastMixin with example: obj = ModelConfig(mode, task_level, return_type)