Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-151: Reset cache settings when saving model #153

Merged
merged 2 commits into from
Oct 18, 2018
Merged

Conversation

tabergma
Copy link
Collaborator

closes #151

@@ -460,8 +462,11 @@ def embedding_length(self) -> int:

def _add_embeddings_internal(self, sentences: List[Sentence]) -> List[Sentence]:

cache_path = '{}-tmp-cache.sqllite'.format(self.name) if self.cache_directory is None else os.path.join(
self.cache_directory, '{}-tmp-cache.sqllite'.format(os.path.basename(self.name)))
Copy link
Collaborator

Choose a reason for hiding this comment

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

This fails if self.cache_directory is not set.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It should not as self.cache_directory is set to None by default and we are checking in this line if self.cache_directory is None or not.

@alanakbik alanakbik merged commit 0c25a0c into master Oct 18, 2018
@tabergma tabergma deleted the GH-151-use-cache branch October 18, 2018 13:15
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.

Set use_cache to False when saving a model
2 participants