Skip to content

Added comments explaining logic for changes in PR #1327#1365

Merged
menshikh-iv merged 1 commit into
piskvorky:developfrom
chinmayapancholi13:random_state_pr_comments1
May 26, 2017
Merged

Added comments explaining logic for changes in PR #1327#1365
menshikh-iv merged 1 commit into
piskvorky:developfrom
chinmayapancholi13:random_state_pr_comments1

Conversation

@chinmayapancholi13
Copy link
Copy Markdown
Contributor

This PR adds comments describing the changes made in #1327. These changes were required because of backward-incompatibility caused because of two attributes of the model : random_state and id2word.

@menshikh-iv
Copy link
Copy Markdown
Contributor

Thanks @chinmayapancholi13

@menshikh-iv menshikh-iv merged commit 370646b into piskvorky:develop May 26, 2017
Comment thread gensim/models/ldamodel.py
id2word_fname = utils.smart_extension(fname, '.id2word')
# check if `id2word_fname` file is present on disk
# if present -> the model to be loaded was saved using a >= 0.13.2 version of Gensim, so set `result.id2word` using the `id2word_fname` file
# if not present -> the model to be loaded was saved using a < 0.13.2 version of Gensim, so `result.id2word` already set after the main pickel load
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pickel => pickle

Comment thread gensim/models/ldamodel.py
kwargs['mmap'] = kwargs.get('mmap', None)
result = super(LdaModel, cls).load(fname, *args, **kwargs)

# check if `random_state` attribute has been set after main pickel load
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pickel => pickle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants