Epoch Logger for LDA Modell

10 views
Skip to first unread message

Felix Selgert

unread,
Jun 29, 2024, 4:16:20 PM (4 days ago) Jun 29
to Gensim
Hi All,
I want to build an Epoch Logger for gensims LDA model from the blueprint of this example: https://radimrehurek.com/gensim/models/callbacks.html
I tried to replace the "CallbackAny2Vec" class with a callback class that is supported by the LDA Model (Perplexity, Coherence, etc.) but I always receive an Attribute Error:
'EpochLogger' object has no attribute 'logger'

Has anyone an idea if it is at all possible to have a simple Epoch Logger that prints information on the start and end on a training epoch.

Many thanks,
Felix
 

Gordon Mohr

unread,
Jul 1, 2024, 3:37:15 AM (2 days ago) Jul 1
to Gensim
Unfortunately the docs page you've linked isn't as clear as it probably should be about differing behaviors/requirements/examples for different models. Still, from a quick glance at it & related source code, I think what you want to do should be possible in just a few lines of code. 

Without seeing your code or the full error traceback, it's hard to guess what might be going wrong. (The error message excerpt you've shown implies some code may be trying  a `logger` variable that's not defined.) Can you show your `EpochLogger` code & the full traceback you're getting?

- Gordon

Reply all
Reply to author
Forward
0 new messages