def METHOD_NAME():
    global global_config
    all_config = load_slim_config(FLAGS.config_path)
    assert "Global" in all_config, "Key 'Global' not found in config file."
    global_config = all_config["Global"]
    reader_cfg = load_config(global_config['reader_config'])
    train_loader = create('EvalReader')(reader_cfg['TrainDataset'],
                                        reader_cfg['worker_num'],
                                        return_list=True)
    if global_config.get('input_list') is None:
        global_config['input_list'] = get_feed_vars(
            global_config['model_dir'], global_config['model_filename'],
            global_config['params_filename'])
    train_loader = reader_wrapper(train_loader, global_config['input_list'])
    if 'Evaluation' in global_config.keys() and global_config[
            'Evaluation'] and paddle.distributed.get_rank() == 0:
        eval_func = eval_function
        dataset = reader_cfg['EvalDataset']
        global val_loader
        _eval_batch_sampler = paddle.io.BatchSampler(
            dataset, batch_size=reader_cfg['EvalReader']['batch_size'])
        val_loader = create('EvalReader')(dataset,
                                          reader_cfg['worker_num'],
                                          batch_sampler=_eval_batch_sampler,
                                          return_list=True)
        metric = None
        if reader_cfg['metric'] == 'COCO':
            clsid2catid = {v: k for k, v in dataset.catid2clsid.items()}
            anno_file = dataset.get_anno()
            metric = COCOMetric(
                anno_file=anno_file, clsid2catid=clsid2catid, IouType='bbox')
        elif reader_cfg['metric'] == 'VOC':
            metric = VOCMetric(
                label_list=dataset.get_label_list(),
                class_num=reader_cfg['num_classes'],
                map_type=reader_cfg['map_type'])
        elif reader_cfg['metric'] == 'KeyPointTopDownCOCOEval':
            anno_file = dataset.get_anno()
            metric = KeyPointTopDownCOCOEval(anno_file,
                                             len(dataset), 17, 'output_eval')
        else:
            raise ValueError("metric currently only supports COCO and VOC.")
        global_config['metric'] = metric
    else:
        eval_func = None
    ac = AutoCompression(
        model_dir=global_config["model_dir"],
        model_filename=global_config["model_filename"],
        params_filename=global_config["params_filename"],
        save_dir=FLAGS.save_dir,
        config=all_config,
        train_dataloader=train_loader,
        eval_callback=eval_func)
    ac.compress()