class_docstr: A custom configuration file parser for SKLL.
docstr: Initialize configuration parser.
docstr_tok: ["Initialize","configuration","parser","."]
code: def __init__(self) -> None:
      """Initialize configuration parser."""
      # these are the three options that must be set in a config
      # file and no defaults are provided
      required = ["experiment_name", "task", "learners"]
  
      # these are the optional config options for which
      # defaults are automatically provided
      defaults = {
          "class_map": "{}",
          "custom_learner_path": "",
          "custom_metric_path": "",
          "cv_seed": "123456789",
          "folds_file": "",
          "feature_hasher": "False",
          "feature_scaling": "none",
          "featuresets": "[]",
          "featureset_names": "[]",
          "fixed_parameters": "[]",
          "grid_search": "True",
          "grid_search_folds": "5",
          "grid_search_jobs": "0",
          "hasher_features": "0",
          "id_col": "id",
          "ids_to_floats": "False",
          "label_col": "y",
          "logs": "",
          "learning_curve_cv_folds_list": "[]",
          "learning_curve_train_sizes": "[]",
          "min_feature_count": "1",
          "models": "",
          "num_cv_folds": "10",
          "metrics": "[]",
          "objectives": "[]",
          "param_grids": "[]",
          "pos_label": "",
          "pipeline": "False",
          "predictions": "",
          "probability": "False",
          "random_folds": "False",
          "results": "",
          "sampler": "",
          "sampler_parameters": "{}",
          "save_cv_folds": "True",
          "save_cv_models": "False",
          "shuffle": "False",
          "suffix": "",
          "test_directory": "",
          "test_file": "",
          "train_directory": "",
          "train_file": "",
          "use_folds_file_for_grid_search": "True",
          "save_votes": "False",
          "wandb_credentials": "{}",
      }
  
      correct_section_mapping = {
          "class_map": "Input",
          "custom_learner_path": "Input",
          "custom_metric_path": "Input",
          "cv_seed": "Input",
          "folds_file": "Input",
          "feature_hasher": "Input",
          "feature_scaling": "Input",
          "featuresets": "Input",
          "featureset_names": "Input",
          "fixed_parameters": "Input",
          "grid_search": "Tuning",
          "grid_search_folds": "Tuning",
          "grid_search_jobs": "Tuning",
          "hasher_features": "Input",
          "id_col": "Input",
          "ids_to_floats": "Input",
          "label_col": "Input",
          "logs": "Output",
          "learning_curve_cv_folds_list": "Input",
          "learning_curve_train_sizes": "Input",
          "min_feature_count": "Tuning",
          "metrics": "Output",
          "models": "Output",
          "num_cv_folds": "Input",
          "objectives": "Tuning",
          "param_grids": "Tuning",
          "pos_label": "Tuning",
          "pipeline": "Output",
          "predictions": "Output",
          "probability": "Output",
          "random_folds": "Input",
          "results": "Output",
          "sampler": "Input",
          "sampler_parameters": "Input",
          "save_cv_folds": "Output",
          "save_cv_models": "Output",
          "shuffle": "Input",
          "suffix": "Input",
          "test_directory": "Input",
          "test_file": "Input",
          "train_directory": "Input",
          "train_file": "Input",
          "use_folds_file_for_grid_search": "Tuning",
          "save_votes": "Output",
          "wandb_credentials": "Output",
      }
  
      # make sure that the defaults dictionary and the
      # section mapping dictionary have the same keys
      assert defaults.keys() == correct_section_mapping.keys()
  
      super(SKLLConfigParser, self).__init__(defaults=defaults)
      self._required_options = required
      self._section_mapping = correct_section_mapping
  
imports: import configparser
  import itertools
  import logging
  import os
  from numbers import Number
  from os.path import basename, join
  from pathlib import Path
  from typing import Any, Dict, List, Optional, Set, Tuple, Union
  import numpy
  from ruamel.yaml import YAML
  from skll.data.readers import safe_float
  from skll.types import ClassMap, FoldMapping, LabelType, PathOrStr
  from skll.utils.constants import PROBABILISTIC_METRICS, VALID_FEATURE_SCALING_OPTIONS, VALID_SAMPLERS, VALID_TASKS
  from skll.utils.logging import get_skll_logger
  from .utils import _munge_featureset_name, _parse_and_validate_metrics, fix_json, load_cv_folds, locate_file
label_desc: Use image node_id 1 to create a new SKLLConfigParser object from inherited base classes: configparser with example: obj = SKLLConfigParser()