-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature/figleaf filter #497
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #497 +/- ##
=============================================
+ Coverage 45.13% 45.40% +0.27%
- Complexity 305 315 +10
=============================================
Files 47 50 +3
Lines 2663 2700 +37
Branches 205 209 +4
=============================================
+ Hits 1202 1226 +24
- Misses 1368 1381 +13
Partials 93 93
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -59,6 +62,7 @@ public class TopicGeneratorClient { | |||
private static final int MAX_CONTEXT_LENGTH = 16385; | |||
private static final EncodingRegistry REGISTRY = Encodings.newDefaultEncodingRegistry(); | |||
private static final Encoding ENCODING = REGISTRY.getEncodingForModel(AI_MODEL); | |||
private final List<StringFilter> stringFilters = Lists.newArrayList(new ChuckNorrisFilter("en"), new ChuckNorrisFilter("fr-CA-u-sd-caqc")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOL, I was wondering how you were going to implement this without committing a bunch of foul language to our repo. :)
topicgenerator/src/main/java/io/dockstore/topicgenerator/helper/StringFilter.java
Outdated
Show resolved
Hide resolved
topicgenerator/src/main/java/io/dockstore/topicgenerator/helper/StringFilter.java
Outdated
Show resolved
Hide resolved
Quality Gate failedFailed conditions |
Description
A simple filter for topic sentences, can take a look in the log to see if workflows are skipped.
A pretty naive implementation that only checks full words
I largely agree with https://blog.codinghorror.com/obscenity-filters-bad-idea-or-incredibly-intercoursing-bad-idea/ but I kinda feel that since "we're" generating these we need to do some minimal due diligence on the results and have something to refer to.
Review Instructions
Could try a bunch of different languages and tests. Or could intentionally create something offensive and try to upload it using the uploader
Issue
https://ucsc-cgl.atlassian.net/browse/SEAB-6538
Security
None.
mvn clean install
in the project that you have modified (until https://ucsc-cgl.atlassian.net/browse/SEAB-5300 adds multi-module support properly)