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

LanguageModelSampler punctuation fix #585

Merged
merged 2 commits into from Feb 1, 2022

Conversation

RobertSamoilescu
Copy link
Collaborator

This PR fixes the punctuation sampling reported in #582 by re-writing the is_punctuation method and the corresponding test_lm_sample_punctuation test.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@@ -23,6 +23,8 @@
"outputs": [],
Copy link
Member

Choose a reason for hiding this comment

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

Line #2.    os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'

Should we remove this from the notebook? Or if it's related to surpressing transformers output then leave a short comment for the line.


Reply via ReviewNB

Copy link
Member

@jklaise jklaise left a comment

Choose a reason for hiding this comment

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

LGTM!

@codecov
Copy link

codecov bot commented Feb 1, 2022

Codecov Report

Merging #585 (0cb6728) into master (529943d) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #585   +/-   ##
=======================================
  Coverage   82.05%   82.06%           
=======================================
  Files          77       77           
  Lines       10517    10520    +3     
=======================================
+ Hits         8630     8633    +3     
  Misses       1887     1887           
Impacted Files Coverage Δ
alibi/explainers/anchor_text.py 87.05% <100.00%> (+0.03%) ⬆️
alibi/explainers/tests/test_anchor_text.py 93.15% <100.00%> (ø)
alibi/utils/lang_model.py 96.69% <100.00%> (+0.05%) ⬆️
alibi/version.py 100.00% <100.00%> (ø)

@RobertSamoilescu RobertSamoilescu merged commit 7a45018 into SeldonIO:master Feb 1, 2022
@ascillitoe
Copy link
Contributor

ascillitoe commented Feb 1, 2022

Nice @RobertSamoilescu. I've fixed the other CI issue we were having so hopefully CI will pass now.

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.

None yet

3 participants