              raise ValueError("'datatype' must be one of str, bool, float or "
                               "int: {} - {}".format(section, title))
          if datatype in (float, int) and (rounding is None or min_max is None):
              raise ValueError("'rounding' and 'min_max' must be set for numerical options")
          if not isinstance(choices, (list, tuple)):
              raise ValueError("'choices' must be a list or tuple")
  
          info = self.expand_helptext(info, choices, default, datatype, min_max, fixed)
          self.defaults[section][title] = {"default": default,
                                           "helptext": info,
 
</s> remove         if datatype not in (str, bool, float, int):
 </s> add         if datatype not in (str, bool, float, int, list): </s> remove             raise ValueError("Default config items must have a section, "
                             "title, defult and  "
 </s> add             raise ValueError("Default config items must have a section, title, defult and " </s> remove             helptext += "\nThis option can be updated for existing models."
 </s> add             helptext += "\nThis option can be updated for existing models.\n"
        if datatype == list:
            helptext += ("\nIf selecting multiple options then each option should be separated "
                         "by a space or a comma (e.g. item1, item2, item3)\n") </s> remove                 opt_value = self.config.get(section, item)
                if opt_value.lower() == "none" and any(choice.lower() == "none"
                                                       for choice in opt["choices"]):
                    continue
                if opt_value not in opt["choices"]:
                    default = str(opt["default"])
                    logger.warning("'%s' is not a valid config choice for '%s': '%s'. Defaulting "
                                   "to: '%s'", opt_value, section, item, default)
                    self.config.set(section, item, default)
 </s> add                 if opt["type"] == list:  # Multi-select items
                    opt_value = self._parse_list(section, item)
                    if not opt_value:  # No option selected
                        continue
                    if not all(val in opt["choices"] for val in opt_value):
                        invalid = [val for val in opt_value if val not in opt["choices"]]
                        valid = ", ".join(val for val in opt_value if val in opt["choices"])
                        logger.warning("The option(s) %s are not valid selections for '%s': '%s'. "
                                       "setting to: '%s'", invalid, section, item, valid)
                        self.config.set(section, item, valid)
                else:  # Single-select items
                    opt_value = self.config.get(section, item)
                    if opt_value.lower() == "none" and any(choice.lower() == "none"
                                                           for choice in opt["choices"]):
                        continue
                    if opt_value not in opt["choices"]:
                        default = str(opt["default"])
                        logger.warning("'%s' is not a valid config choice for '%s': '%s'. "
                                       "Defaulting to: '%s'", opt_value, section, item, default)
                        self.config.set(section, item, default)
        if isinstance(datatype, list) and not choices:
            raise ValueError("'choices' must be defined for list based configuration items")
              raise ValueError("'datatype' must be one of str, bool, float or "
                               "int: {} - {}".format(section, title))
          if datatype in (float, int) and (rounding is None or min_max is None):
              raise ValueError("'rounding' and 'min_max' must be set for numerical options")
        if isinstance(datatype, list) and not choices:
            raise ValueError("'choices' must be defined for list based configuration items")
          if not isinstance(choices, (list, tuple)):
              raise ValueError("'choices' must be a list or tuple")
  
          info = self.expand_helptext(info, choices, default, datatype, min_max, fixed)
          self.defaults[section][title] = {"default": default,
                                           "helptext": info,
keep keep keep add keep keep keep keep keep keep
 scripts.train - Add freeze weights option
lib.config:
  - Better formatting for .ini files
  - Support multi-select options
gui - Add support for multi-select config items 
lib/config.py