def get_save_handler(config):
    if config['with_trains']:
        from ignite.contrib.handlers.trains_logger import TrainsSaver
        return TrainsSaver(dirname=config['output_path'])
    return DiskSaver(config['output_path'], require_empty=False)
def get_save_handler(config):
    if config['with_trains']:
        from ignite.contrib.handlers.trains_logger import TrainsSaver
        return TrainsSaver(dirname=config['output_path'])
    return DiskSaver(config['output_path'], require_empty=False)