Skip to content Skip to sidebar Skip to footer

Saved Gensim Ldamallet Model Not Working In Different Console

I am training a ldamallet model in python and saving it. I am also saving training dictionary that I can use to create corpus for unseen documents later. If I perform every action

Solution 1:

Despite the name, those aren't actually 'temp' files, as the model needs them to run. I'd strongly suggest you copy them to the new console in the same relative location (prefix) as on the old (so the model knows where to look for them.) Hopefully that will work. I haven't tried it myself however.

The infer files appear when you go from training to classifying with the model. I assume they need the inferencer to be built... I've had to delete and retrain my mallet models so many times as these files get corrupted often.

Solution 2:

Yeah, you will need to bring those files along with you: https://github.com/RaRe-Technologies/gensim/issues/818

Solution 3:

After loading the model, you can specify the new prefix path like so:

ldamodel.prefix = 'path/to/new/prefix'

Post a Comment for "Saved Gensim Ldamallet Model Not Working In Different Console"