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

[FIX] Keywords - Handle connection error #992

Merged
merged 2 commits into from
Aug 20, 2023

Conversation

PrimozGodec
Copy link
Collaborator

Issue

Fixes #890

Description of changes

Handle connection errors and warn users about them.

Includes
  • Code changes
  • Tests
  • Documentation

@PrimozGodec PrimozGodec marked this pull request as ready for review August 2, 2023 10:27
@codecov-commenter
Copy link

Codecov Report

Merging #992 (9867d3c) into master (9c0faca) will increase coverage by 0.06%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #992      +/-   ##
==========================================
+ Coverage   79.66%   79.72%   +0.06%     
==========================================
  Files          87       87              
  Lines       12319    12332      +13     
  Branches     1617     1620       +3     
==========================================
+ Hits         9814     9832      +18     
+ Misses       2211     2209       -2     
+ Partials      294      291       -3     

kws = func(corpus if needs_tokens else documents, **kw)
# None means that embedding completely failed on document
# currently it only happens with mbert when connection fails
keywords = [kws for kws in kws if kws is not None]
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor comment: I'd have for kw in kws; because it's singular and also because somebody (who doesn't know that this was fixed in Python 3) would fear that kws would be leaked out of list comprehension.

I'm merging as it is; if you want, just push a commit with this change into master. :)

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 was actually my mistake (probably while making some changes). Agree to the use of the singular. I will fix it on master.

@janezd janezd merged commit a32bf17 into biolab:master Aug 20, 2023
13 checks passed
@PrimozGodec PrimozGodec deleted the keywords-connection-fail branch August 21, 2023 06:51
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.

Extract Keywords: crashes when computation interrupted (no internet)
3 participants