class_docstr: Igel is the base model to use the fit, evaluate and predict functions of the sklearn library
class_docstr_tok: ["Igel","is","the","base","model","to","use","the","fit",",","evaluate","and","predict","functions","of","the","sklearn","library"]
code: def __init__(self, **cli_args):
      logger.info(f"Entered CLI args: {cli_args}")
      logger.info(f"Executing command: {cli_args.get('cmd')} ...")
      self.data_path: str = str(
          cli_args.get("data_path")
      )  # path to the dataset
      logger.info(f"reading data from {self.data_path}")
  
      self.command = cli_args.get("cmd", None)
      if (
          not self.command
          or self.command not in self.available_commands
      ):
          raise Exception(
              f"You must enter a valid command.\n"
              f"available commands: {self.available_commands}"
          )
  
      if self.command == "fit":
          self.yml_path = str(cli_args.get("yaml_path"))
          file_ext = self.yml_path.split(".")[-1]
          logger.info(
              f"You passed the configurations as a {file_ext} file."
          )
  
          self.yaml_configs = (
              read_yaml(self.yml_path)
              if file_ext == "yaml"
              else read_json(self.yml_path)
          )
          logger.info(f"your chosen configuration: {self.yaml_configs}")
  
          # dataset options given by the user
          self.dataset_props: dict = self.yaml_configs.get(
              "dataset", self.default_dataset_props
          )
          # model options given by the user
          self.model_props: dict = self.yaml_configs.get(
              "model", self.default_model_props
          )
          # list of target(s) to predict
          self.target: list = self.yaml_configs.get("target")
  
          self.model_type: str = self.model_props.get("type")
          logger.info(
              f"dataset_props: {self.dataset_props} \n"
              f"model_props: {self.model_props} \n "
              f"target: {self.target} \n"
          )
  
          # handle random numbers generation
          random_num_options = self.dataset_props.get(
              "random_numbers", None
          )
          if random_num_options:
              generate_reproducible = random_num_options.get(
                  "generate_reproducible", None
              )
              if generate_reproducible:
                  logger.info(
                      "You provided the generate reproducible results option."
                  )
                  seed = random_num_options.get("seed", 42)
                  np.random.seed(seed)
                  logger.info(
                      f"Setting a seed = {seed} to generate same random numbers on each experiment.."
                  )
  
      # if entered command is export, then the pre-fitted model needs to be loaded and converted to onnx
      elif self.command == "export":
          self.model_path = cli_args.get(
              "model_path", self.default_model_path
          )
          logger.info(
              f"path of the pre-fitted model => {self.model_path}"
          )
  
      # if entered command is evaluate or predict, then the pre-fitted model needs to be loaded and used
      else:
          self.model_path = cli_args.get(
              "model_path", self.default_model_path
          )
          logger.info(
              f"path of the pre-fitted model => {self.model_path}"
          )
  
          self.prediction_file = cli_args.get(
              "prediction_file", self.prediction_file
          )
  
          # set description.json if provided:
          self.description_file = cli_args.get(
              "description_file", self.description_file
          )
  
          # load description file to read stored training parameters
          with open(self.description_file) as f:
              dic = json.load(f)
              self.target: list = dic.get(
                  "target"
              )  # target to predict as a list
              self.model_type: str = dic.get(
                  "type"
              )  # type of the model -> regression, classification or clustering
              self.dataset_props: dict = dic.get(
                  "dataset_props"
              )  # dataset props entered while fitting
      getattr(self, self.command)()
  
imports: import json
  import logging
  import os
  import warnings
  import joblib
  import numpy
  import pandas
  from sklearn.model_selection import cross_validate, train_test_split
  from sklearn.multioutput import MultiOutputClassifier, MultiOutputRegressor
  from skl2onnx import convert_sklearn
  from skl2onnx.common.data_types import FloatTensorType
label_desc: Use image node_id 1 to create a new Igel object  with example: obj = Igel()