def short_name(model):
    # for a single model, this will work
    name = model.__class__.__name__
    try:
        if hasattr(model, 'steps'):
            # pipeline
            name = '-'.join( [ pair[0] for pair in model.steps ] )
        elif hasattr(model, 'best_estimator_'):
            if hasattr(model.estimator, 'steps'):
                # gridsearchcv
                name = 'gscv_' + '-'.join( [x[0] for x in model.estimator.steps ])
            elif hasattr(model.estimator, 'estimators'):
                # votingclassifier
                name = 'gscv_vc_' + '-'.join( [x[0] for x in model.estimator.estimators ])
        elif hasattr(model, 'base_estimator_'):
            # bagging
            name = 'bag_' + short_name(model.base_estimator)
    except AttributeError, e:
        util_logr.info('utils.short_name() couldnt generate quality name')
        # for a single model, this will work
        name = model.__class__.__name__
        util_logr.info('falling back to generic name={}'.format(name))
    return name
Harness to test if the FrameSet.union call works properly.
dataset/ETHPy150Open jrmontag/mnist-sklearn/utils.py/short_name--crossover with--dataset/ETHPy150Open sqlboy/fileseq/test/run.py/TestFrameSet._check_union