

def main(argv=None):
    args = docopt.docopt(__doc__, argv=argv)
    logging.basicConfig(level=(logging.INFO if (not args['--debug']) else logging.DEBUG), format='%(asctime)s %(levelname)s:%(name)s -- %(message)s')
    params_config = yamlconf.load(open(args['<params-config>']))
    features_path = args['<features>']
    features = yamlconf.import_module(features_path)
    label_decoder = util.DECODERS[args['--label-type']]
    if (args['--observations'] == '<stdin>'):
        observations_f = sys.stdin
    else:
        observations_f = open(args['--observations'])
    observations = util.read_observations(observations_f, features, label_decoder)
    scoring = metrics.SCORERS.get(args['--scoring'], label_decoder['--scoring'])
    folds = int(args['--folds'])
    if (args['--report'] == '<stdout>'):
        report = sys.stdout
    else:
        report = open(args['--report'], 'w')
    if (args['--processes'] == '<cpu-count>'):
        processes = multiprocessing.cpu_count()
    else:
        processes = int(args['--processes'])
    if (args['--cv-timeout'] == '<forever>'):
        cv_timeout = None
    else:
        cv_timeout = (float(args['--cv-timeout']) * 60)
    scale_features = args['--scale-features']
    verbose = args['--verbose']
    run(params_config, features_path, observations, scoring, folds, report, processes, cv_timeout, scale_features, verbose)

dataset/ETHPy150Open wiki-ai/revscoring/revscoring/utilities/tune.py main/VarMisuse@157/237 `args`->`label_decoder`