class_docstr: Hold some config params to control generation and report procedure.
class_docstr_tok: ["Hold","some","config","params","to","control","generation","and","report","procedure","."]
docstr: :param str task: task name
  :param string out_dir: out dir for saving generated samples,
      default current path.
  :param int max_trans: maximum transformed samples generate by
      one original sample pre Transformation.
  :param int random_seed: random number seed to reproduce generation.
  :param str|list[str] fields: fields on which new samples are generated.
  ::param str model_file: path to the python file containing
   the FlintModel instance which named 'model'.
  :param list trans_methods: indicate what transformations
      to apply to dataset.
  :param dict trans_config: parameters for the initialization
      of the transformation instances.
  :param bool return_unk: whether apply transformations which may
      influence label of sample.
  :param list sub_methods: indicate what subpopulations
      to apply to dataset.
  :param dict sub_config: parameters for the initialization
      of the subpopulation instances.
  :param str attack_methods: path to the python file containing
   the Attack instances which named "attacks".
  :param str|list[str] validate_methods: indicate use which validate
      methods to calculate confidence of generated samples.
docstr_tok: [":","param","str","task",":","task","name",":","param","string","out_dir",":","out","dir","for","saving","generated","samples",",","default","current","path",".",":","param","int","max_trans",":","maximum","transformed","samples","generate","by","one","original","sample","pre","Transformation",".",":","param","int","random_seed",":","random","number","seed","to","reproduce","generation",".",":","param","str|list","[","str","]","fields",":","fields","on","which","new","samples","are","generated",".",":",":param","str","model_file",":","path","to","the","python","file","containing","the","FlintModel","instance","which","named","'model","'",".",":","param","list","trans_methods",":","indicate","what","transformations","to","apply","to","dataset",".",":","param","dict","trans_config",":","parameters","for","the","initialization","of","the","transformation","instances",".",":","param","bool","return_unk",":","whether","apply","transformations","which","may","influence","label","of","sample",".",":","param","list","sub_methods",":","indicate","what","subpopulations","to","apply","to","dataset",".",":","param","dict","sub_config",":","parameters","for","the","initialization","of","the","subpopulation","instances",".",":","param","str","attack_methods",":","path","to","the","python","file","containing","the","Attack","instances","which","named","``","attacks","''",".",":","param","str|list","[","str","]","validate_methods",":","indicate","use","which","validate","methods","to","calculate","confidence","of","generated","samples","."]
code: def __init__(
      self,
      task="UT",
      out_dir=None,
      max_trans=1,
      random_seed=1,
      fields=None,
      flint_model=None,
      trans_methods=None,
      trans_config=None,
      return_unk=True,
      sub_methods=None,
      sub_config=None,
      attack_methods=None,
      validate_methods=None,
      **kwargs,
  ):
      """
      :param str task: task name
      :param string out_dir: out dir for saving generated samples,
          default current path.
      :param int max_trans: maximum transformed samples generate by
          one original sample pre Transformation.
      :param int random_seed: random number seed to reproduce generation.
      :param str|list[str] fields: fields on which new samples are generated.
      ::param str model_file: path to the python file containing
       the FlintModel instance which named 'model'.
      :param list trans_methods: indicate what transformations
          to apply to dataset.
      :param dict trans_config: parameters for the initialization
          of the transformation instances.
      :param bool return_unk: whether apply transformations which may
          influence label of sample.
      :param list sub_methods: indicate what subpopulations
          to apply to dataset.
      :param dict sub_config: parameters for the initialization
          of the subpopulation instances.
      :param str attack_methods: path to the python file containing
       the Attack instances which named "attacks".
      :param str|list[str] validate_methods: indicate use which validate
          methods to calculate confidence of generated samples.
  
      """
      self.task = task
      self.out_dir = out_dir if out_dir else "."
      self.max_trans = max_trans
      self.fields = fields if fields else TRANSFORM_FIELDS[self.task]
      self.flint_model = flint_model
      self.random_seed = random_seed
      if len(task) >= 2 and task[-2:] == "cn":
          self.trans_methods = self.get_generate_methods(
              trans_methods,
              ALLOWED_cn_TRANSFORMATIONS,
              allow_pipeline=True,
          )
      else:
          self.trans_methods = self.get_generate_methods(
              trans_methods,
              ALLOWED_TRANSFORMATIONS,
              allow_pipeline=True,
          )
      self.trans_config = trans_config if trans_config else {}
      # TODO, support the function. default not return origin and return unk
      self.return_unk = return_unk
  
      self.sub_methods = self.get_generate_methods(
          sub_methods, ALLOWED_SUBPOPULATIONS
      )
      self.sub_config = sub_config if sub_config else {}
  
      self.attack_methods = attack_methods
      self.validate_methods = self.get_generate_methods(
          validate_methods, ALLOWED_VALIDATORS
      )
      self.check_config()
  
file_path: textflint/textflint/input/config/config.py
imports: import os
  import six
  import json
  import copy
  from ...common.utils.logger import logger
  from ...common.settings import NLP_TASK_MAP, ALLOWED_TRANSFORMATIONS, TRANSFORM_FIELDS, ALLOWED_SUBPOPULATIONS, ALLOWED_VALIDATORS, ALLOWED_cn_TRANSFORMATIONS
label_desc: Use image node_id 1 to create a new Config object  with example: obj = Config(task, out_dir, max_trans, random_seed, fields, flint_model, trans_methods, trans_config, return_unk, sub_methods, sub_config, attack_methods, validate_methods)