Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Pipeline error - "ValueError: too many inputs" - limit on number of custom factors?

I'm getting a mystery Pipeline error (see the attached notebook):

ValueError: too many inputs  

The error does not result if the number of custom factors is reduced. So, I'm concluding that there is a limit on the number of custom factors. Is there a limit, or is something else going on?

5 responses

Any feedback on this error? I've pinged Q support, but no response yet.

Anyone? I'd like to understand if there is a limitation to the number of custom factors supported by Pipeline (and if it will be maintained as a limitation going forward), since it affects the overall algo structure.

Anyone looked into this?

I have ran into this problem too. I got around it bu calculating part of the factors using a very archaic aggregation in the pipeline for about 20 of my alpha factors, and the other 30 or so are in CustomFactor classes, which are executed in a similar manner as yours. If I figure anything else out I will let you know, as I am trying to get them all into CustomFactor classes to apply ML eventually. I am curious of Quantopian's answer, as I am going to need some room going forward too.

Hi Dane -

Oddly, if I do the alpha combination outside Pipeline I don't run into the same limitation. Below is a snippet of code I'm using in an algo. When I get the chance, I'll see if I can use something similar in the broken notebook I posted above.

def factor_pipeline():  
    factors = make_factors()  
    pipeline_columns = {}  
    for k,f in enumerate(factors):  
        pipeline_columns['alpha_'+str(k)] = SimpleMovingAverage([f(mask=QTradableStocksUS())],window_length=FACTOR_AVG_WINDOW,mask=QTradableStocksUS())  
    pipe = Pipeline(columns = pipeline_columns,  
    screen = QTradableStocksUS())  
    return pipe