Set the number of topics for the _convert_gensim_corpus2csr() method in the fit_transform() and transform() methods of LsiVectorizer in text.py. This enforces the same number of topics across training and testing.